PDA

View Full Version : IDE with emulation!



T.Jackson
- 27th February 2007, 14:32
My wish for the next evolution of PBP...

Just like in VB, you type your code then hit F5 to run. But how do you base an interrupter around a real-World event you ask? Emulation. If MAME can emulate complex 68000 hardware, why can't MELabs do the same with PBP.

Obviously a much more trying task than just rendering pixels to the screen in a video game. But nonetheless not too far-fetched in my humble opinion. Something idealistic would cater for the virtualization of all commonly used components in modern circuitry.

1. Virtual passive components, resistors, caps
2. An equally impressive library of actives such as LCD's, BJT's etc...

The user would strap together circuits on the screen – just like drawing up a PCB – hit F5 to run the code. On screen the user would be greeted with a bird’s eye view of exactly how their design will work before they actually build it. This would dramatically reduce the Overall cost of development. No prototyping, go straight to PCB.

Trent Jackson

Luciano
- 27th February 2007, 19:00
Hi Trent,

This already exists in the northern hemisphere!

http://www.labcenter.co.uk/index_uk.htm

Best regards,

Luciano

mister_e
- 28th February 2007, 00:01
and the west hemisphere wish you good luck with anything like that...

This would dramatically reduce the Overall cost of development.
:eek: no way for me! There's no time saving.. believe me... just hair lost at best.

No prototyping, go straight to PCB.
:eek: No f... way for me!

T.Jackson
- 28th February 2007, 02:31
Like it, love it or even hate it! It's what's destined for pretty much everything in the not too distant future. Most people have already started to welcome it.
It has only just started...

How can it reduce development cost?

1. Less time. Fewer overheads.
2. Fewer errors.
3. No need for developers to maintain an inventory of parts.
4. Existing designs are much more easily maintained.
5. Less staff (don’t know if this is such a good thing for society)

Best Regards,

Trent Jackson

skimask
- 28th February 2007, 05:32
Like it, love it or even hate it! It's what's destined for pretty much everything in the not too distant future. Most people have already started to welcome it.
It has only just started...

How can it reduce development cost?

1. Less time. Fewer overheads.
2. Fewer errors.
3. No need for developers to maintain an inventory of parts.
4. Existing designs are much more easily maintained.
5. Less staff (don’t know if this is such a good thing for society)

Best Regards,

Trent Jackson

Agree with mister_e 99%. Simulators might be a good 1st step, but that's it, an initial 1st step to see if an idea might even be remotely feasible. Relying on a simulator in my mind is false economy. 2nd step straight to the prototyping stage, not straight to a production PCB.

T.Jackson
- 28th February 2007, 08:51
Agree with mister_e 99%. Simulators might be a good 1st step, but that's it, an initial 1st step to see if an idea might even be remotely feasible. Relying on a simulator in my mind is false economy. 2nd step straight to the prototyping stage, not straight to a production PCB.

I have about 10 years of expertise with electronics and computers. There's a heck of a lot that I know and an equal amount that I don't. Over the years I have had a dozen projects published in the Silicon Chip magazine, and I've also been employed as an electronics technician in some previous job roles.

Often the people that I’ve worked around have reminded me that a lot of professional design engineers take their initial schematic and go straight to PCB. In my first technical role with a company called BEAR Solutions, I once threw my hands in the air offering to prototype some of their designs. In my spare time even. I figured I'd learn a thing or two. The response was very clear. We go straight to PCB; if the design needs corrections we simply modify the layout and request another 1 off board from our suppliers.

Economically this can work well, but only if you plan on ordering a specific quantity after the design has been perfected. At worst you'll be up for the tooling fee. Some manufactures may write this amount off or bury it somewhere into the actual total cost. Of course though, if your production runs small, or you have extreme doubts with the integrity / workability of your design, then this may not be a feasible approach. There’s a big difference between R&D and setting out to produce a product that uses known to be good and working technology.

All told, if you know exactly what you're doing then there's no reason why you shouldn't be able to go straight to PCB. (*Sure wish I did)

Best Regards,

Trent Jackson

malc-c
- 28th February 2007, 10:53
We go straight to PCB; if the design needs corrections we simply modify the layout and request another 1 off board from our suppliers.

So you could end up with half a dozen PCB's that are of no use what so ever and have costed you a small fortune for one off runs.. not to mention the time wasted in lead time from the PCB house. This would be fine if you worked in a multi-million pound company, but for hobby or small companies I still feel that breadboarding first is the way to go.

I used to work for a national defence organisation in the UK, and spent a lot of time in the labs with the engineers and designers. They would often supply me with the probervial "design on the back of an envelope" and I would first build the circuit on some strip board - they would then test it to see if it works as they predicted, and then it would be passed for prototyping - once the prototype board was etched and tested the first revison batch of PCBs were made. By the time the whole project had been researched and developed and then put forward for production the revison of the PCB may of changed five fold, but originally the concept was prototyped on a breadboard / stripboard first.

For hobby use - can't see the point of using a simulator. Breadboard the circuit, and test in the real world. Then build a prototype PCB and test that - it it works add the glitter round the edges (logo etc) and publish !

T.Jackson
- 28th February 2007, 11:24
If you anticipated on this then going straight to PCB isn’t for you. In fact, the anticipation of ending up with half a dozen unsuccessful attempts clearly spells out that there must be a lot of uncertainty in the design. Possibly due to the fact that it might be a large-scale project, or just a whole heap of research and development that’s required.

Consider this scenario:
You design say 5 new projects every month. On average, 20 discrete logic IC’s, Z80 microcontroller, 50 passive components to boot…

Now, in the real-World implementation phase you have 1 of 2 choices.

A) Employ someone to prototype it. Skilled person required. Might take possibly a week to Vero-board it.

B) Double check, TRIPPLE check your work and go straight to PCB.
Board comes back from the manufacture, fill it, solder it, test it and you’re done. Few hours work. Possibility you might get it the first time? For someone who really knows their stuff, yes I believe so.

Tooling fee is about $100. Of course though, this arrangement would only work if your design used existing technology. Otherwise there would be too much guess work involved and I would agree with your argument entirely.

Best Regards,
Trent Jackson

T.Jackson
- 1st March 2007, 03:03
Another worthwhile mention is that, if a circuit works on vero or breadboard, it doesn’t necessarily guarantee that it will work as planed on a PCB. Conductors have both capacitance and resistance attributes which can effect the proper operation of many circuits. In particular with RF and audio designs. Even some digital too.

Poorly designed audio is very distinctly noticeable to the human ear - noise introduced perhaps because of an earth loop - while RF based designs may often just refuse to work. Another consideration is track width on a PCB, you may have used heavy-duty hookup wire for these parts on some vero-board, works fine perhaps, but on the PCB the width may be insufficient to handle the amount of required current.

Plus…
On breadboard or vero the design may work well, perhaps because of the exact layout of the components? When you take it to PCB it might produce an adverse result because you changed things. If this is the case then you have effectively taken a step backwards.

All told, if what you’re doing now seems to work well for you then don’t change it. Better the devil you know. I am a firm believer in this entirely.

Best Regards,
Trent Jackson

vacpress
- 1st March 2007, 08:14
t. jackson..

checkout 'proteus', it is a fairly cool program that 'has every component', emulates PICs, etc. and it is almost useless except as an education or schematic capture program. this isnt your fault, i know, but it is the way it is. Apparently some people use In Circuit Emulation, which is beyond me right now. Maybe you should go checkout some really expensive tools at microchip.com.

however, just wait till you need a component not in the library, then you get to learn all about SPICE models. Then imagine, you dont own protron, you own PBP.. hehe.. whoops.

why are you berating people here about direct to PCB? I have worked a few places also.. At least one huge multinational.. In engineering.. (Not electronics).

Some projects we had lots of boards comming in, sometimes a few a week. Other times it was wirewrap..Not much breadboarding, admitadely.. Another good example of 'people who know what they are doing' is in university.. They work out their complex physics stuff on breadboards often.

Furthermore, this work style you are talking about is really geared to companies with a product range they have worked on for some time, so they have existing design experience particular to the type of design they are doing..


Your condescending tone is worthless in comparison to the friendly and obvious excellence of the people who are debating with you.

T.Jackson
- 1st March 2007, 12:00
Thanks for the tips. I am not debating with anyone. I am however stating the FACT that the majority of professional designers no longer breadboard their work. Twenty years ago this was not the case.

Best Regards,

Trent Jackson

Luciano
- 1st March 2007, 12:09
Another worthwhile mention is that, if a circuit works on vero or breadboard, it doesn’t necessarily guarantee that it will work as planed on a PCB. Conductors have both capacitance and resistance attributes which can effect the proper operation of many circuits. In particular with RF and audio designs. Even some digital too.

Poorly designed audio is very distinctly noticeable to the human ear - noise introduced perhaps because of an earth loop - while RF based designs may often just refuse to work. Another consideration is track width on a PCB, you may have used heavy-duty hookup wire for these parts on some vero-board, works fine perhaps, but on the PCB the width may be insufficient to handle the amount of required current.

Plus…
On breadboard or vero the design may work well, perhaps because of the exact layout of the components? When you take it to PCB it might produce an adverse result because you changed things. If this is the case then you have effectively taken a step backwards.

Hi Trent,

All that applies also if you simulate your circuit on the screen of a PC.

Best regards,

Luciano

mister_e
- 1st March 2007, 15:29
Some SIMS may have their advantage indeed... now i'm from the old school, and the old approach always serves me well.

Yes i agree there's some good point in a sim, but 'till now none of what's already on the market tun me on. 'Till now i think only NI MultiSim got more points than other... but to sim PIC or else micro... the list is just too limited.

Proteus... is probably the best for what we do... but it's actually a pain to use and a little bit too limited on the analog section. I read it could be possible to ask for some model if needed. If free SPICE model where easy to plug-in... now it could bee much cool. Maybe they're actually work on something like that... who knows?

This said, they're suppose to send me their latest version (7.0) in the next days/week. I'll give a better test drive..

For the PCB... all good point as well. But if you really want to sim a PCB with every possible situation, you would have to enter tons of parameters first, and IF the Sims can do it... you would probably have never saved any time.

If a SIM coulod do the exact job (PCB, digital, analog... ) and was 100% reliable... it's cost will certainely be more than 1,2 thousands dollars. Wich is something a hobbyist would never afford or be tempted by.

Sure todays component size makes the prototyping task a little bit hard, but it's still doable, even with home-made PCBs.

Oh well, maybe SIM are the future, but for now, i still prefer the good ol' method.

T.Jackson
- 2nd March 2007, 03:58
While I have never actually test-driven Proteus, but like with pretty much anything else that's new in this World, willing to bet that there's a steep new learning curve involved. I can even picture it being quite daunting too.

Could it be anymore complex than manually routing a double sided through hole plated PCB with silkscreen masks? If it is, then it’s really not in line with my suggestion. If you Require a science degree to drive it then it would be very seldom that it would appeal to anyone without this degree. Makes matters even worse if there are actually genuine flaws with it too.

Can MELabs come up with a better solution that is low in cost, reliable, easy-to-use and pretty much entirely specific to the range of PICs that their brilliant compiler supports? At least my wish is clear.

Best Regards,
Trent Jackson

mister_e
- 2nd March 2007, 04:54
Firsts times when i tried it, Proteus was a real pain in the *** to use and set-up. Even the first DOS version of SPICE (P-SPICE) was easier to use.. those who remind of it ;)

By what their sales representative said to me about the new version 7.0....

This Version has a new user interface and is much easer to use.

I wish... Oh well, even if it was just time to be comfortable with... no big deal. The MAIN problem is always...


May i trust it?

time will tell.

http://www.picbasic.co.uk/forum/showthread.php?t=5759&highlight=proteus

Now you can also try the PROTEUS MPLAB plugin if you want. :eek:

T.Jackson
- 3rd March 2007, 02:41
I say give it time it'll get better. There's obviously a very mixed bag of feelings towards simulators on this forum. While I realize that simulators have been around since late DOS days, but with the way in which we know of them today, It's still relatively new technology in my book. Attempting to emulate the exact behavior of 1,000’s upon 1,000’s of parts would be a very cumbersome chore. With digital electronics, it either works or it doesn’t. In the analog domain it’s an entirely different story…

Few years ago I took the opportunity of test driving a simulator called Crocodile Clips. Windows-based, included a modest library of parts, resistors, capacitors, CMOS 4000 series of logic IC’s, BJT’s, - (Bipolar Junctions Transistors) – LED’s, buzzers, pretty much all of the commonly used active & passive components.

I was quite impressed, and a little disappointed too. I strapped together a light chaser circuit in about 20 mins, using the built-in signal generator as the clock source. Then I tried to make a relaxation oscillator using a Schmitt triggered NAND gate with calculated R & C for a 10Hz clock. Didn’t work. The simulator didn’t have the ability to emulate the true characteristics of Schmitt trigger NAND gate with feedback. Interestingly though, it could actually emulate a typical RC time-constant.

Best regards,
Trent Jackson

T.Jackson
- 3rd March 2007, 04:12
December of last year I wrote an emulator to simulate a real-World project that was published in the Silicon Chip magazine back in 1999. A 32 LED microcontroller-based Christmas tree. The tree uses bi-colour LEDs and has a seemingly endless array of patterns, which are stored in an onboard EEPROM.

So taken by this tree, I decided to write an emulator for it. It's not identical to the original and it's far from perfect. There is about 100K of unavoidable source code in it. An absolutely ridiculous amount of time was spent on this project in attempts to simulate the behavior of something that is ultimately quite simple in real life.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=67268&lngWId=1

Best Regards,
Trent Jackson

Luciano
- 3rd March 2007, 11:00
Hi Trent,

I have downloaded your Dynamic LED XMAS Tree. (VB6 source code).
From what I can see the object-oriented capabilities of Visual Basic 6.0
have not been used. The LEDs of your program are a perfect example where
the use of object-oriented programming could bring real benefits.

For more fun use:

Visual Basic 2005 Express Edition which can be downlaoded for free:
http://msdn.microsoft.com/vstudio/express/vb/

or

Visual C# Express which is also free:
http://msdn.microsoft.com/vstudio/express/visualcsharp/default.aspx

Best regards,

Luciano

T.Jackson
- 3rd March 2007, 13:40
Hi Luciano.

Far as I'm aware, VB doesn't cater for true OOP - Object Orientated Programming. There's no Polymorphism, inheritance, yada, yada, yada. It is object-based though. Not so long ago I used to confuse myself with the two. There's a lot of debate about what VB can and can't do.

Anyhow, like it or love it, but the main reason I coded the Tree how it is was to please a very fussy audience. I did it how everyone wanted it, so I won a competition for it. Anything that's posted on PSC has to be either API or DirectX-based to even get a moments consideration.

It can be a real tough game on PSC. Just when you think you're starting to get real good in VB someone comes along and posts something that's just absolutely way out of this World and you sit there scratching your head telling yourself "gee, I've still really got a long way to go".

By the way, thanks for all those links :)

Best Regards,
Trent Jackson

Luciano
- 3rd March 2007, 16:48
Far as I'm aware, VB doesn't cater for true OOP - Object Orientated Programming. There's no Polymorphism, inheritance, yada, yada, yada. It is object-based though. Not so long ago I used to confuse myself with the two. There's a lot of debate about what VB can and can't do.

Hi Trent,

Did you ever try with VB6?

Programming with Objects (MSDN Library / VB6)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconprogrammingwithobjects.asp

Programming with Your Own Objects (MSDN Library / VB6)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconprogrammingwithyourownobjects.asp

If not, then use C# or VB.Net. (Good investment for the future).

Object-oriented programming is almost ineluctable if you want to
develop your own simulation programs.

Best regards,

Luciano

T.Jackson
- 4th March 2007, 01:48
Hi Luciano,

Yes, over the years I have done a lot of object-based programming in VB.
I agree, Object-Orientated-Programming would be an essential ingredient to be used with any complex simulator such as Proteus.

No plans on anything like that for a while. I'm currently a full time student with nothing but a lot of discrete maths and technical jargon on my mind.

Best Regards,
Trent Jackson

RYTECH
- 26th February 2008, 01:59
I would love to see a "simulator" included in PBP / Microcode studio.

as a hobbyist my usual design strategy is:

a) concept diagram
b) breadboard
c) wirewrap version
d) homemade photoresist (the kind you expose to light with your design overtop) etched pcb

tenaja
- 26th February 2008, 21:39
I would love to see a "simulator" included in PBP / Microcode studio.

as a hobbyist my usual design strategy is:

a) concept diagram
b) breadboard
c) wirewrap version
d) homemade photoresist (the kind you expose to light with your design overtop) etched pcb
Check out the VSM at www.labcenter.co.uk --it will run full spice on most PIC's. It will only run PBP compiled into ASM code.

If you want to run it step by step in Basic, the Proton+ compiler comes with a limited version of the VSM that has a handful of fixed (not editable) development boards. This allows you to test most of your code, unless it is totally hardware dependent. Combining the VSM and Proton allows you to edit the hardware and step through the basic code...this gets expensive, but is worth it if you code a lot.