Menu

Simulation/Emulation?

Help
mkstevo
2016-03-29
2016-04-08
  • mkstevo

    mkstevo - 2016-03-29

    Can anyone suggest a simulator or emulator for PIC devices? Specifically I'm looking to 'run' code destined for the PIC16F1825 or 16F1829 devices. Many of the emulators I've looked at don't cover these devices. I'm not looking for over-complex emulation (simulation) something that allows pins to be set high when set as inputs, and pins visually changing state when set as outputs would suffice. The ability to load a 'hex' file and 'run' it is all I'd need.Code stepping from within GCB would be nirvana, but I don't realistically expect it.

    I've tried OshonSoft's PIC16 emulator, but it seems either not to work at all, or is so slow so as to be unuseable. Their own demo programs fail to compile (Error 52?) and too fail to simulate as I'd expect or like.

    Is there anything better?

     
  • Chuck Hellebuyck

    You can take the raw .asm file produced by GCB and create a project in MPLAB or MPLAB X. Gives you breakpoints, single step, can watch registers, etc. in the simulator. If you have a PICkit 3 or preferrably a ICD3, you can do it all in hardware. And the BASIC commands will show up as comments (you may have to enable that) so you know where you are in the program. I haven't done this lately but I'm sure it stil works as this is the beauty of GCB, is it produces pure assembly code.

     
  • mkstevo

    mkstevo - 2016-03-30

    I have a rather old version of MPLAB, I still have to support some legacy software written for the 16C55, 57 type of PICs and have only been able to (successfully) write these using a PICStart Plus programmer with a hardware serial port. The MPLAB version I have does this.

    If I understand you correctly, I can create a new MPLAB project, import an .asm file created by GCB and then simulate this within MPLAB? As soon as I have a spare day, I'll give that a try.

    Many thanks, I had no idea! [As I'm sure is clear...]

     
  • Chuck Hellebuyck

    Yep, just make a project and add the asm file.

     
  • mkstevo

    mkstevo - 2016-04-08

    I started this at 9am this morning. Perhaps MPLab is built for cleverer people than I, but when I finally got the simulation working, it wasn't really what I was hoping for. I failed to get the code trace to work, except when paused and failed to see much if any activity in the memory while the program executed.

    I'd ideally like something similar to that provided for the PicAxe processors. a clear, simple graphical representation of the target chip, with legs that light up when outputs are active, or can be clicked to set inputs active.

    Should anyone know of such a thing, suitable for the 16F1825/1829 processors, at a reasonable price I'd still be interested.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.