pic16f877a programming using microcode studio, picbasic

Thread Starter

hongda17

Joined Feb 3, 2010
1
I had try to load sample program in microcode studio like "blink" into pic16f877a, but the pic just wont respond...

The program is as follow:

loop:
High PORTB.0 ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds

Low PORTB.0 ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds

Goto loop ' Go back to loop and blink LED forever
End

Is there particular command to add in order to make this simple LED blinking work for pic 16f877a?
I am using microcode studio to compile and using "PICkit 2.55 programmer" to write the file into pic.
My circuit for pic is bought from supplier... it has no problem blinking the LED with the supplier's sample hex code...

if i cant solve this, I cant proceed to do more difficult programming...
pls help....
 

t06afre

Joined May 11, 2009
5,934
I do not program in Basic. But a few things to check. Configurations bits for the chip. Se the "SPECIAL FEATURES OF THE CPU" section in your data sheet. Also is the TRISB reg values correct. I do not think the Basic compiler set the TRISB reg for you.
 
Top