jis
Junior Member level 3
hi all.........
i am doing a project using pic16f877a. And its my first experience with pic .i coded it using mikroc with default set up and i am using a 4mhz crystal and selected HS mode while flashing...at first i wrote a simple code to control 1 of the ic which is a part of my project.. it worked satisfactorly when i simulated using "PIC SIMULATOR"... but i am not getting any o/p when i flashed the same to pic ... Anyone pls help me out in solving this problem.. the code i wrote is as follows...
//This prog is to playback msg stored in ic apr9600. The msg stored in the field which is selected by making the msg select pin low. There are 8 msg fields and msg select bits are connected to portb
Thanks.........
i am doing a project using pic16f877a. And its my first experience with pic .i coded it using mikroc with default set up and i am using a 4mhz crystal and selected HS mode while flashing...at first i wrote a simple code to control 1 of the ic which is a part of my project.. it worked satisfactorly when i simulated using "PIC SIMULATOR"... but i am not getting any o/p when i flashed the same to pic ... Anyone pls help me out in solving this problem.. the code i wrote is as follows...
//This prog is to playback msg stored in ic apr9600. The msg stored in the field which is selected by making the msg select pin low. There are 8 msg fields and msg select bits are connected to portb
Code:
void main()
{option_reg = 0x80; //disable portb internal pullup
trisb = 0x00;
portb = 0xff;
while(1)
{
delay_ms(5000);
portb = 0x7f; //select 8th msg
Delay_ms(5000);
portb = 0xff;
delay_ms(5000);
portb = 0xbf; //select 7th msg
Delay_ms(5000);
portb = 0xff;
delay_ms(5000);
portb = 0xfb; //select3rd msg
Delay_ms(5000);
portb = 0xff;
delay_ms(5000);
portb = 0xf7; // select 4th msg
Delay_ms(5000);
portb = 0xff;
delay_ms(5000);
portb = 0xdf; //select 6th msg
Delay_ms(5000);
portb = 0xff;
delay_ms(5000);}
}
Thanks.........
Last edited by a moderator: