Recent Posts

Pages: [1] 2 3 4 5 6 ... 10 Next
Beginners / Re: Function return in C
« Last post by MarkF on Today at 06:18:20 PM »
Back in the day when almost all code was written in assembly, we had a problem where the computer would crash after 4 to 5 hours of running.  It took 2 of us working 16 hours a day for almost a week to find out that a function with multiple exits had one of those exits that left an extra byte on the stack. Since the function didn't exit that way very often, it took hours for the stack to fill up a crash the computer.

For complex systems and large routines, it's BAD practice to have multiple exits.  Frequently it's a sign of poorly designed and laid out logic.  Granted, C doesn't have the issues with stack manipulation but there are lots of other reasons not to have multiple exits. Especially with multiple programmers modifying the code over it's life cycle.
Am I doing something wrong with my test connections to this thing? The sine looks clean if I use the main circuit ground, but if I clip my scope probe's ground clip to the floating AGND (which is where the wave out is supposed to get ground), I get the attached picture. Same holds true if anything else gets grounded to AGND (other than the amplitude trimmer) or it somehow makes its way back to that main ground.

AFAIK, the test gear, including the regulated supply that's feeding the XR2206, is all getting AC/Ground from the same strip. I thought the whole point of a floating ground was to avoid these sort of conflicts. Seems anything you use this output signal for is going to have some path back to it from its power source. I'm also figuring if it were some sort of ground loop issue, it would just be noisier or something and wouldn't instantly jump into this weird single pole shape. I'm feeding it a clean 12V, but it stays roughly the same shape at lower voltages. Am I missing something?

Thanks Again!

I haven't tried it with a floating ground. I used two rails.

Check the voltage between your XR2206 floating ground and your scope's ground. If there are more than zero volts there then when you clip the ground probe of the scope to the output it is not going to work as it's shorting the bottom half of the supply out.

You can AC couple the output however! Connect your scope ground to the real ground (not the virtual one) and stick a 10uF or so capacitor (negative side to the scope probe) between the probe and the XR2206. That will block the DC component. That should let you know if it's an issue with the virtual ground or the generator itself.
Beginners / Re: Where to buy components to explode some capacitors
« Last post by bjcuizon on Today at 06:14:26 PM »
Are you considering Aliexpress? There is this store called "Professional semiconductor suppliers"
Here's some of their caps if you need them: just choose your flavour! ;)
They also sell some modules..didn't research much though. ::)
...And they usually ship 17-36 days to NZ(maybe its different to Australia)-if that's OK for you. :-//

DISCLAIMER: I am not affiliated with this store in any way.
Beginners / DIY hw probe
« Last post by Boschi on Today at 06:13:53 PM »
before starting, im trying to measure the output waveform of an inverter. we are near the distribution transformer of our electricity provider, so our ground resistance to earth its just few ohms (ergo im not connecting the ground clip).

i have already done some measurement but with a normal 10x probe, and after a while the trimmer cap happily released the blue smoke 8) but im threathing everything as directly connected to the mains and im also following the rule of the "pocket", so i was away and nothing dangerous happened.

now i want to do some more measurements, but a bit safer, and because its a one-off and i need it quickly i wonder how safe is to make a hw probe by myself.

even better, because its just 50Hz how bad would it be to add 9 10M resistor in series with a 10X probe? (so making a 100x probe whitout compensation cap)

i dont need absolute precision, i just want to see what appens at the waveform while i switch off the grid and the inverter kicks in.

thanks for any advice  ;D
Beginners / Re: Function return in C
« Last post by ataradov on Today at 06:10:56 PM »
Have they done a follow up review? I see no indication of MISRA making anything better. Good coding style is a must. But a lot of MISRA is junk, like only having simple for loops with counters starting from 0.

A lot of problems  MISRA detects are avoidable by turning on warnings in modern compilers and actually reading them.

Furthermore, some stuff that MISRA suggests is actively harmful and sabotages compiler error detection.

It may have been useful 10-15 years ago, but compilers advanced quite a bit since then.

Beginners / Re: Which stores do you guys usually purchase from?
« Last post by bd139 on Today at 06:08:08 PM »
TME - good, fast, acceptable range of parts to choose from[/li][/list]

TME shipping from Poland are actually usually faster to me than Farnell/RS are as they use DHL which always arrives early morning where the latter usually arrive after lunch the next day.  :-+
Crowd Funded Projects / Re: Preparing EEZ H24005 for crowdfunding
« Last post by garnix on Today at 06:08:03 PM »
I also started building my EEZ H24005 - very nice. I was surprised how small the packet was :-) packed very efficiently and clear!

I followed your instructions to start building the unit and it was easy to follow. I had a few areas where I had to slow down and turn on my brain because it was not 100% clear - but close ;)

  • Earthing: It was not clear where the zagged washer goes: below earth-ring (for better contact with case) or below screw (to lock the screw) in other devices there are often two of them below and above - I settled to: between case and earth-ring from cable harness
  • Cables from power-supply to power-boards: Not sure where to route these - I settled to route them in between the slot of the two power-supplies
  • Ethernet patch cable: I was not sure on the orientation of the plug on the front panel. Until I discovered the marked dot on the circuit boards, so I made sure the colored cables matched them
  • I routed the cables from the back panel to the front panel and there is an instruction to strap it down with a lock tie. Not sure where and if strapping this IDX cable is a good idea ;) it looks like this might not be needed

The unit looks really nice - tomorrow I will finish the build.
Microcontrollers & FPGAs / Re: Getting started using PICF630 on MPLAB
« Last post by MrT123 on Today at 06:05:06 PM »
Thanks for your reply, however it comes up with the error that it can't open the include file. No such file or directory
Beginners / Re: Function return in C
« Last post by Kjelt on Today at 05:54:48 PM »
It is definitely not a (religious) belief, it is a programming paradigm:
Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures, for and while loops—in contrast to using simple tests and jumps such as the go to statement, which could lead to "spaghetti code" that was difficult to follow and maintain.
One extension of this paradigm is the early exit*1 discussed here.

Same with MISRA it has its virtues but also overcomplicated rules but they were created for a reason besides hackling the programmer. If you read the code review of the Toyota begin 2000 and the hundreds of software problems they found you would know there could be good reasons for coding guidelines and paradigms to follow on bigger projects. As long as you are programming your own 8 or 32 bits micro for home projects do what you want, are you programming in a team follow the team/company rules or get sacked.

*1 see next link at early exit:

BTW already discussed here:
Test Equipment / Re: The Summary Siglent SDS1202X-E Thread
« Last post by MrW0lf on Today at 05:54:25 PM »
Then let us hope that user can force scope to full memory acquisition also with fast time bases for some special needs for some rare technical reasons or just as for psychological reasons.

This is essentially same as "horizontal zoom" without splitting window. So they should implement either this or that, if implement both - becomes quite confusing for user and puzzle for GUI dude.
I would rather vote for horizontal zoom. It is better than to fiddle with mem setting because you always know what is total time window captured - not so obvious when fiddling with mem setting.
Also with horizontal zoom you can drop/raise sample rate by changing mem on the fly, but retain exact same timebase/zoom state.

Pages: [1] 2 3 4 5 6 ... 10 Next