Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
I'm using MBLab 7.01, so that's what these instructions are targeted for.
To bring up the simulator run controls, go to Debugger menu -> Select Tool -> MBLAB SIM.
To view specific aspects of the simulated PIC, go to the View menu, and from there you can select program memory, file registers, special function registers (which is where you would get your simulated output pins), and such.
For input, go to Debugger -> Stimulus Controller -> New Scenario. Click in the first column under the Pin heading. Select which pin you desire from the dropdown menu. For the Action column, there are a few options. Set High, Set Low, Toggle, Pulse High, Pulse Low. Toggle is probably what you want, so that you can use a single Fire button ' > ' there in the first column of the stim controller box to turn a pin on and off.
oh, ok, i got it, i've been making many codes and programming it to the pic without testing the inputs in the simulator, i have been testing it on the real hardware how do you use the scenario thing, the attach and all?
Previous versions had the simulator too. It's just that I don't have the previous versions anymore, so if a menu is different, or the simulator is accessed a different way in any of the older versions, my instructions may need to be altered, which was why I mentioned my version number, just so you would be aware in case you ran into a problem and wondered why you were not seeing what I am seeing.
As for using the scenario thing... Um... reread my original post? Go into the scenario editor and assign a toggle trigger to your various pins. Want to be able to turn on Port A pin 3? Make RA3 to be a toggle, then run the simulator with that box still visible. Be sure to have the file registers and special function registers on-screen also. Start the program simulation. After the initialization, whenver you want you can click on the fire button > and you will notice that A3 is now a 1 in the special function registers window, and your program will operate accordingly. Click the fire button again, and A3 becomes 0.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.