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.

Pic simulator.

Status
Not open for further replies.

Zener_Diode

New Member
Does someone know how can I simulate PIC program (input/output data from pin) without buying simulation bord?

MPLAB doesn't give me option to simulate input data from pin port.

I have also cracked Proteus, but the program there doesn't run, like there is no clock to the pic. I gave clock by cristal - it doesn't work, and from generator too- it still doesn't work.
Does someone know why???


thanks ahead.
 
Hi,
How to add extra IC which is not in the library of Proteus? I found that there are not much new PICs.
I'm using 6.9 sp5
 
bananasiong said:
Hi,
How to add extra IC which is not in the library of Proteus? I found that there are not much new PICs.
I'm using 6.9 sp5

Proteus 7.1 has support for 24F PIC's (Separate License Required)

If you come across a device that isn't supported, then simply use the advance function generator, or make a small PIC program to simulate the device & throw the PIC in the circuit (very handy)
 
Zener_Diode said:
Does someone know how can I simulate PIC program (input/output data from pin) without buying simulation bord?

MPLAB doesn't give me option to simulate input data from pin port.

You can do that in MPLAB SIM.

Select DEBUGER>MPLAB SIM
Stimulus>New Workbook

In the workbook you can define pin and SFR values based on clock cycles or async.
 
gramo said:
Proteus 7.1 has support for 24F PIC's (Separate License Required)

If you come across a device that isn't supported, then simply use the advance function generator, or make a small PIC program to simulate the device & throw the PIC in the circuit (very handy)
Can I copy the library of Proteus Demo 7 to the directory v6.9?
I'm new to Proteus, can I know how to create a new instrument or IC for Proteus? For example PICs, RF module, etc.

Thanks
 
bananasiong said:
Can I copy the library of Proteus Demo 7 to the directory v6.9?

No, well at least I really don’t think so... There are many other upgrades besides new devices...

bananasiong said:
I'm new to Proteus, can I know how to create a new instrument or IC for Proteus? For example PICs, RF module, etc.

You can create simple signal generators/circuits that mimic the task/function of the custom device your using. Think outside the square, for example, a small PIC program can be used to simulate almost any device that is not supported by Proteus 'out of the box'

If you manage to figure out how to turn circuits etc into new packages, I'd be all ears!
 
gramo said:
You can create simple signal generators/circuits that mimic the task/function of the custom device your using. Think outside the square, for example, a small PIC program can be used to simulate almost any device that is not supported by Proteus 'out of the box'

If you manage to figure out how to turn circuits etc into new packages, I'd be all ears!
I'm not sure. I took out a PIC16F877 from the library, select it by right clicking on it. Then Library-->Make device. Then the windows of device properties comes up. I named it as 877A and choose the package, datasheet, place to be stored. But I couldn't find where is the setting of the new device, such as the memory, number of pins etc.
The rf module tlp434 is also not available from the library too. I've seen you able to have them in you Proteus, can you guide me how to make new devices?
BTW, what does it mean by
Think outside the square, for example, a small PIC program can be used to simulate almost any device that is not supported by Proteus 'out of the box'

Thanks
 
The devices found on this **broken link removed** (the RF Modules) were custom devices, eg,

**broken link removed**

Open Proteus

Click on Help, Then ISIS Help

Now look at attachment 1 for the rest of the instructions to find the ISIS tutorial section. Notice that the section about creating new devices is past half way down in the Tutorial file.
 

Attachments

  • ISIS Example.JPG
    ISIS Example.JPG
    110.4 KB · Views: 746
Your custom PIC Program can do almost anything that is thinkable, so you can create a small program that "Simulates" almost any device that isn’t supported.

I've used this analogy to simulate RC receivers that send out several servo signals, or as advance signal generators to Simulate the actual signal that would be present in real life.
 
I didn't know that there is a tutorial in the help file. I referred to the Creating a Device only. Need to spend some time on the long tutorial.

Thanks
 
Hi,
Now I'm doing with LCD. First, I followed Nigel's tutorial, but not exactly. I just changed the oscillator, and the output port for displaying the LCD. After I assembled, I load the hex file into the PIC using Proteus, but I couldn't see anything from the LCD.
Then I followed exactly Nigel's code, it is still not working.
Then I moved to hardware, I constructed everything up and it is working.
Is there any setting needs to be done in Proteus?
 
gramo said:
Can you share your .DSN file from Proteus? Its the saved circuit of your simulation.


O, and the source code would be handy aswell, perhaps you can just zip them together?
Yes, these are the files.
I'm using the source code in Nigel's tutorial.

Thanks
 

Attachments

  • LCD.zip
    15.7 KB · Views: 238
Briefly I did, and your code did not function as intended.

There’s definitely no issues with Proteus ISIS, a couple of notes, make sure you connect the PIC up as you would in real life. And declare the oscillator speed within the PIC's options in ISIS. eg;

**broken link removed**

Perhaps someone else could lend a hand in the assembler field of things, but here’s a working example

Code (Proton PIC Basic)

Code:
[B]DEVICE [/B]16F628A
[B]CONFIG [/B]INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, LVP_OFF

[B]LCD_DTPIN[/B] = PORTB.4 
[B]LCD_RSPIN[/B] = PORTB.2
[B]LCD_ENPIN[/B] = PORTB.3
[B]LCD_INTERFACE[/B] = 4 
[B]LCD_LINES[/B] = 2

[B]ALL_DIGITAL[/B] = True

[B]DelayMS [/B]150
[B]Cls[/B]


[B]Print At[/B] 1, 1, "Hello World"

[B]Stop[/B]
 
Yes, I connected them up same for the simulation and also in real according to Nigel's tutorial.
About the processor clock, if I use a 4 MHz crystal, I just put 4 MHz there in Proteus? Or 1 should put 1 MHz (fosc/4)?
How about the program configuration word? Since I have it already in my program code, so I just ignore it?
 
bananasiong said:
About the processor clock, if I use a 4 MHz crystal, I just put 4 MHz there in Proteus? Or 1 should put 1 MHz (fosc/4)?


If your crystal is 20Mhz, then enter 20Mhz, or 4Mhz, then enter 4Mhz

bananasiong said:
How about the program configuration word? Since I have it already in my program code, so I just ignore it?


The Program Config Word should be extracted from the .hex produced by the compiler automatically
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top