PIC Simulator

Status
Not open for further replies.
Hi Guys
Loving this thread.. just reading through it now. Just discovered the OS section and having been introduced to Os it's about time I got more in to it.

Eric your a great Tutor as usual.

Cheers
 
the program is not opening

I have downloaded the software from the website but it is not working at all. Please help me how to run it. I have tried to install different versions form various sources nothing is working.
 
Last edited:
I have downloaded the program from the website but it is not working at all. Please help me how to run it. I have tried to install different versions form various sources nothing is working.

hi,
Which program have you downloaded.??
 
The software is not at all opening

Hi,
Which PC operating system are you using.? Windows. etc.

Try un-installing the PIC sim, then re-download the trial version from the Oshonsoft web site.
The program may have been corrupted during downloading.

If the program still fails to run, contact the Oshonsoft site by email and report the problem.
 
i am using windows7. I have tried un-installing and re-downloading the software but no use. even on Oshonsoft website I am not able to report the problem
 
i am using windows7. I have tried un-installing and re-downloading the software but no use. even on Oshonsoft website I am not able to report the problem

hi,
I have heard of problems with Win7 and Oshonsoft, I use Win XP.

For Win7 I believe that you must run as Administrator for the first opening of the PIC sim.
 
I have installed oshonsoft onto Vista (same security as 7) you must run as administrator (even the install file) or it won't load

Ian
 
I am just starting, as well, and I use the PICkit2 as a simulator. Once you learn how to use it, it is a very helpful tool.
Both the simulator and the PK2 use the same IDE/debugger, good but initially confusing..

Some explanation of terms.

The MPLAB simulator is a program/code on the PC that simulates a pic. No real PIC is involved.

The PK2 provides run control(breakpoints, step) and monitoring of the PIC it is connected to. The code is executed on that PIC and no simulator is required. This is know as ICD or In Circuit Debugging.

With the simulator you have an unlimited number of breakpoint.
With the PK2 the number of breapoints is determined by the PIC you are using. Some 1 others 3.

With the simulator you can use a simulated logic analyzer.
With the PK2 you need a real one.

etc
 
Last edited:
Hi
To start with I have written a program using mikroC, for pic16f882 using 4 MHz external crystal oscillator, to increase and decrease a number based on input from RA1/RA2 and display on multiplexed 7 segment display. 1s position is controlled by RA3 and 10s position is controlled by RA4. It is a common cathode. I am usin real pic simulator for simulation. The sequence is not followed while increase or decrease operations and both the digits are showing the same value. Following is the program. Shall someone help me on this.

unsigned char seg[10]={0x80,0xf2,0x48,0x60,0x32,0x24,0x04,0xF0,0x00,0x30};
unsigned short i, DD0=0x80,DD1=0x80;
unsigned int tc,k=0,t1c;
void display_temp(short DD0, short DD1)
{
for (i=0;i<1;i++)
{
TMR1IE_bit=1;
while(!TMR1IF_bit )
{
PORTC = seg[DD0];
PORTA.f3= 1; // Select Ones Digit
PORTA.f4= 0;
delay_ms(1);
PORTC = seg[DD1];
PORTA.f3= 0;
PORTA.f4= 1; // Select Tens Digit
delay_ms(1);
if(PORTA.f0==1 || PORTA.f1 == 1 || PORTA.f2 == 1)
{
TMR1IE_bit=0;
TMR1IF_bit=0;
break;
}
}
TMR1H=0x9E; //begin with 0
TMR1L=0x58;
TMR1IE_bit=0;
TMR1IF_bit=0;
if(PORTA.f0==1 || PORTA.f1 == 1 || PORTA.f2 == 1)
break;
}
return;
}


void main()
{
int tc=0,count=0,set=0, t1,t1c=0;
GIE_bit=1;
TRISA=0xE7; // Set PORTA
TRISC=0x01; // set PORTC as OUTPUT except pin0
PORTA=0x00;
PORTC=0x80;
ANSEL=0x00;
ANSELH=0x00;
T1CON=0x01; //tmr1on bit is set
TMR1H=0x9E; //begin with 0
TMR1L=0x58;
while(1)
{
if(PORTA.f2==1)
{
if(tc==0) tc=67;
else tc--;
}
if(PORTA.f1==1)
{
if(tc==67) tc=0;
else tc++;
}
DD0 = tc%10;
DD1 = tc/10;
display_temp(DD0,DD1);
TMR1IE_bit=0;
TMR1IF_bit=0;
}
}
 
yup he should have started another thread....

tong143 gets a Genu-wine O-fishul Yosemite Sam "Iahma Highjackin' This Here Thread" Award.
 

Attachments

  • Yosemite-Sam-1.jpg
    21.9 KB · Views: 453
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…