PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Apr 24, 2006 1:43 pm |
|
|
Did you fully install the compiler, including the CCS "Plug-in", etc. ?
Did you go to the Debugger menu in MPLAB and then in the Select Tool
menu, did you pick MPLAB SIM ?
In the Configure menu, did you go to Select Device, and make sure
it matches the PIC specified in the #include statement in your program ?
Then compile and in the Debugger menu, select Animate.
Using the UART1 output window, the following program slowly
spells out Hello World. It works.
Code: | #include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
void main()
{
while(1)
{
printf("Hello World\n\r");
}
} |
Instructions on how to use UART1 to display output in MPLAB simulator:
http://www.ccsinfo.com/forum/viewtopic.php?t=23408&start=1 |
|