Continue to Site

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.

  • 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.

Possible to use MPLAB to simulate waveforms and response to input?

Status
Not open for further replies.

toodles

New Member
I continuing work on a project of mine you can read about here:
**broken link removed**

I'm trying to add support for the Nintendo Gamecube. The Gamecube uses a single open collector line for communication, with each bit taking 4us: if its a high bit, is 1us low, 3us high while a low bit is 3us low, 1us high. now I think I've got the code for reading and writing this way set, but of course its not working on the real hardware.

What I'd like to figure out is how to use a waveform of some sort on the computer for simulation and debugging. I'd also like the ability to see the wafeform the PIC responds with. I can see the 'Stimulus' and 'workbook' menu items in MPLAB using MPSIM, but I cannot find any usefull information on HOW to use them, or if they even do what I am wanting. What I really want is something like ModelSIM from the Xilinx WebPack, but for PICs.

Given my situation of needing both input and output stimulus, what sort of simulation and debugging options do I have, and where are some easy instructions on starting their use?
 
Go through the following steps:
1. Create a New Workbook
2. Click on "Click here to Add Signals" and choose your input pin (GP0 in my example).
3. Enter the data: time instants and binary values.
4. Save the file.

I've created a sequence of three 1s according to the specs you posted, see the image below. When you run the debugger, you can view the registers' content and undertand how the PIC reacts.
Hope this helps.
 

Attachments

  • stimulus.png
    stimulus.png
    7.1 KB · Views: 285
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top