Electronics-Related.com
Forums

PSoC or FPGA?

Started by fasf March 20, 2011
Jan Panteltje expounded in
news:im9soq$e0a$5@news.albasani.net: 

> On a sunny day (Mon, 21 Mar 2011 17:23:34 -0400) it > happened Phil Hobbs > <pcdhSpamMeSenseless@electrooptical.net> wrote in > <4D87C1D6.6000109@electrooptical.net>: > >>Taking a simulation and poking it until it sort-of works is >>a recipe for mediocre performance, at best. On the other >>hand, board turns and the attendant delays are expensive. >>In analogue, it's best to design stuff by hand and simulate >>to verify (and maybe optimise some badly-behaved stuff >>that's hard to do by algebra, e.g. parametric effects). >> >>I'm a big fan of debuggers for code, because that makes it >>faster to explore all the branches and reduces the number >>of bugs that make it into the version control system. > > I stopped using debuggers in the eighties, after reading a > paper from university that argued against debuggers in > higher level languages,. It suggested to use print > statements.
If you work on large systems, then avoiding debuggers is a huge waste of time. When you have intermittant or unexplained failure(s) a debugger saves gobs of time since you don't have to anticipate what to "print". When your code core dumps, a debugger will trace back the precise point of the failure and allows you to look at anything related to it. All of this facility comes with a simple compile option. No need to code special macros. In short, you're following some bad and antiquated advice. Warren
On a sunny day (Tue, 22 Mar 2011 13:26:45 +0000 (UTC)) it happened Warren
<ve3wwg@gmail.com> wrote in
<Xns9EB0601772EF2WarrensBlatherings@188.40.43.213>:

>If you work on large systems, then avoiding debuggers is a >huge waste of time. When you have intermittant or unexplained >failure(s) a debugger saves gobs of time since you don't have >to anticipate what to "print". > >When your code core dumps, a debugger will trace back the >precise point of the failure and allows you to look at >anything related to it. > >All of this facility comes with a simple compile option. No >need to code special macros. > >In short, you're following some bad and antiquated advice. > >Warren
That is a matter of opinion. I have seen to many programmers staring too long at little windows with register values... While just some sane coding and understanding WHAT you were doing (in C), and print statements in the right place, would have saved hours, and prevented all that 'searching', and segfaults too. It is a beginners idea, I started with 'debugger'. From a programming POV at some point you have to trust the compiler writers, no need to go through the generated asm even. You can take that too far too. For example write in Java because you are scared of pointers, and then make a product that sucks for speed and performance. 'Oh lets write this in Java, it will run anywhere'. NOT. Coding is not for everyone, but many who have no talent for it do it for a job, like music made by somebody who cannot play. For those those sluggish languages and C++ was created, too bad it only makes their work worse. And then people start to believe you need many cores many GHz to do the simplest things, like email. And that sells hardware, so those manufacturers will not disturb that dream. The ones who sell you the next C++ compiler, plus debugger, will not disturb your dream either. Reality is however that you should have a clear mind when you code and not make one error every line, and spend 30 minutes with a debugger for every line of code you write. The fable of 'large project' is just that. Things should be modular, and C and C libraries is a very good way to do that. Linux is a good example from a huge project with many distributed developers, written in C, and in Linux I never used a debugger ever. Oh I know gdb, I played with it, but I rather write code than trace gcc output. Sure there are bugs in each gcc version, just that those never seem to have wrecked my code. Some sanity is required. Not everybody is a programmer, not everybody loves that stuff. I do not claim to be a programmer, I just write what I need, and somehow enjoy that. Some others benefit as I make much code available, if I can, and it is not NDA stuff. I know my programs are full of bugs, but they get the job done. That is the point where my quest for perfection in programming usually ends. Programs are a tool, not a purpose in themselves, no tool is absolutely perfect, try looking for the perfect hammer, I have broken some expensive ones... Anyways, there is no end to what can be said about that subject, and no limit to all the different viewpoints., This is just my viewpoint. So I will leave it at that,
Jon Kirwan wrote:

> I may have some questions when the time comes. But the above > helps by giving me some things to check up on.
comp.arch.fpga is a good newsgroup for FPGA questions. And there are far less offtopic posts than in this newsgroup, maybe because of less retirees and more people doing real work :-) -- Frank Buss, http://www.frank-buss.de piano and more: http://www.youtube.com/user/frankbuss
Hi,

Please check the following link

http://img138.imageshack.us/img138/271/62661460.jpg

or

http://img138.imageshack.us/i/62661460.jpg/

The thing is that I got only two wires coming out of the 7805 and I
want to power up the circuit with it and than also want to charge the
12 volt battery throught the same two wires.Offcourse the circuit or
the charger, only one will be connected at one time. They will not be
connected together at the same time. But I need to avoid 7805. Can a
four diode bridge work, if yes than how?

Thanks
John
On Tue, 22 Mar 2011 19:31:10 +0100, Frank Buss
<fb@frank-buss.de> wrote:

>Jon Kirwan wrote: > >> I may have some questions when the time comes. But the above >> helps by giving me some things to check up on. > >comp.arch.fpga is a good newsgroup for FPGA questions. And there are far >less offtopic posts than in this newsgroup, maybe because of less >retirees and more people doing real work :-)
Thanks. Jon
On Tue, 22 Mar 2011 11:40:13 -0700 (PDT), john1987
<conphiloso@hotmail.com> wrote:

>Hi, > >Please check the following link > >http://img138.imageshack.us/img138/271/62661460.jpg > >or > >http://img138.imageshack.us/i/62661460.jpg/ > >The thing is that I got only two wires coming out of the 7805 and I >want to power up the circuit with it and than also want to charge the >12 volt battery throught the same two wires.Offcourse the circuit or >the charger, only one will be connected at one time. They will not be >connected together at the same time. But I need to avoid 7805. Can a >four diode bridge work, if yes than how? > >Thanks >John
I can only find an "equivalent circuit" for a 7805, but I'd guess the following will work... Diode, anode to battery, cathode to _input_ of 7805 Diode, anode to _output_ of 7805, cathode to battery I don't foresee any sneak paths that could damage the 7805, but you'll have to try it to make sure ;-) Caution, don't exceed 20V in the charging direction. ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Remember: Once you go over the hill, you pick up speed
Jan Panteltje expounded in
news:imanmt$clr$1@news.albasani.net: 

> On a sunny day (Tue, 22 Mar 2011 13:26:45 +0000 (UTC)) it > happened Warren <ve3wwg@gmail.com> wrote in > <Xns9EB0601772EF2WarrensBlatherings@188.40.43.213>: > >>If you work on large systems, then avoiding debuggers is a >>huge waste of time. When you have intermittant or >>unexplained failure(s) a debugger saves gobs of time since >>you don't have to anticipate what to "print". >> >>When your code core dumps, a debugger will trace back the >>precise point of the failure and allows you to look at >>anything related to it. >> >>All of this facility comes with a simple compile option. No >>need to code special macros. >> >>In short, you're following some bad and antiquated advice. >> >>Warren > > That is a matter of opinion.
Your's is in the minority. :)
> I have seen to many programmers staring too long at little > windows with register values... While just some sane coding > and understanding WHAT you were doing (in C), and print > statements in the right place, would have saved hours, and > prevented all that 'searching', and segfaults too.
That speaks volumes about the programmers-- and nothing about the value of the debugger. Don't get me wrong- a few carefully crafted prints can augment a difficult debug. But to write off a debugger is like saying "I can saw it by hand, so I don't need no stinkin' table saw". Warren
Hi,

Can you advice schematic or a sketch?

John
On Monday, March 21, 2011 1:44:16 PM UTC-7, john1987 wrote:
 
> I need to connect a 12 volts DC lead acid battery to a circuit. The > circuit draws 100mA and works at 3.3V. ... The > Circuit and the battery charger both have same input power connector > on them and the battery has the mating connector for both of them.
If the battery (12V) connects to a charger (12 to 15V) on the identical connector that a 3.3V circuit uses, you ought to redesign the system so those are NOT possible to interconnect. Or, maybe your '3.3V circuit' includes all the necessary stepdown regulators to safely connect to higher voltages?
On 22/03/2011 19:55, Jim Thompson wrote:
> On Tue, 22 Mar 2011 11:40:13 -0700 (PDT), john1987 > <conphiloso@hotmail.com> wrote: > >> Hi, >> >> Please check the following link >> >> http://img138.imageshack.us/img138/271/62661460.jpg >> >> or >> >> http://img138.imageshack.us/i/62661460.jpg/ >> >> The thing is that I got only two wires coming out of the 7805 and I >> want to power up the circuit with it and than also want to charge the >> 12 volt battery throught the same two wires.Offcourse the circuit or >> the charger, only one will be connected at one time. They will not be >> connected together at the same time. But I need to avoid 7805. Can a >> four diode bridge work, if yes than how? >> >> Thanks >> John > > I can only find an "equivalent circuit" for a 7805, but I'd guess the > following will work... > > Diode, anode to battery, cathode to _input_ of 7805
Won't this leave the poor 7805 output stage facing the charger? Surely a resistor from 7805 output to ground as a dummy load and a diode from 7805 output to the charger socket pin would be safer. I guess it probably won't kill a 7805 to find it's "regulated" output hard clamped to 2 diode voltage drops above its input and at nearly three times the notional target output voltage but it can't be ideal. Regards, Martin Brown
> > Diode, anode to _output_ of 7805, cathode to battery > > I don't foresee any sneak paths that could damage the 7805, but you'll > have to try it to make sure ;-) > > Caution, don't exceed 20V in the charging direction. > > ...Jim Thompson