Nigel Orr- Underwater Acoustics Group wrote: > So it seems... someone mentioned gpsim- I've not heard of it- do you have > any more details? gpsim is a software simulator for (primarily) PIC microcontrollers. It's still in development, but it is distributed under GPL - in other words it's doesn't cost anything (depending on how you measure cost) and the source code is available. It is only a text-based command line interface, however there is active discussion on the GNUPIC mailing list for wrapping a gui around it. So far, most of the infrastructure is in place for simulating PICs. The major features include: o Breakpoints - Execution breakpoints - Register read breakpoints -- break if a specific value is read -- break if anything is read - Register write breakpoints -- break if a specific value is written -- break if anything is written - (break if control C is pressed; 0.0.6) o Execution - run - single step - multi-step - step over o Memory - dump all - dump range - modify a value - dump eeprom o Trace - gpsim traces every action taken o Stimuli - Synchronous bit stimulus (e.g. a clock) - Asynchronous bit stimulus (e.g. a serial data stream) - Asynchronous byte stimulus (not yet implemented) - I/O pin stimulus -- Input only -- bidirectional -- bidirectional with pull up -- open collector - Analog stimulus (not yet implemented) o Disassembler o Nodes - gpsim supports a node list (or if you wish a netlist) that allows you to connect two or more stimuli together gpsim is designed to emulate more than one processor - though currently only one is supported. Eventually the other 'processors' will include LCD displays, A/D converters, etc. gpsim is designed to be fast. On my 400 MHz pentium I can simulate a 20Mhz pic in real time! Here's a dump of the gpsim's help: gpsim> help attach Attach stimuli to nodes break Set a break point clear Remove a break point disassemble Disassemble the current cpu dump Display either the RAM or EEPROM echo echo "text" help Type help "command" for more help on a command node Add or display stimulus nodes quit Quit gpsim run Execute the pic program step Execute one or more instructions. stimulus Create a stimulus trace Dump the trace history x examine and/or modify memory I currently support only the 16C84. This is because I'm still working on the gpsim's infrastructure. However gpsim supports all of the c84's peripherals: eeprom, wdt, tmr0, interrupts, I/O ports. The next release will be 0.0.6 and will occur Monday or Tuesday next week. I will not announce any releases to the PIC list though until the basic simulator is complete. You'll have to lurk the gnupic mailing list if you want to catch the announcements. see http://reality.sgi.com/jamesb/gnupic/ on instructions on how to join the gnupic mailing list. Scott