View previous topic :: View next topic |
Author |
Message |
Angelo
Joined: 06 Oct 2006 Posts: 6 Location: Russia
|
PIC18F452 & Proteus |
Posted: Fri Oct 06, 2006 8:35 am |
|
|
|
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Sat Oct 07, 2006 7:51 pm |
|
|
Proteus will simulate that circuit correctly if you tie MCLR high and use the following program.
Code: | #include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=10000000)
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,bits=8,ERRORS)
void main() {
printf("CONTROL LED WITH PIC\n\r");
do {
printf("\n\r");
printf("Press any key to turn on led...\n\r");
getch();
output_high(pin_d0);
printf("Press any key to turn off led...\n\r");
getch();
output_low(pin_d0);
} while (TRUE);
} |
|
|
|
Angelo
Joined: 06 Oct 2006 Posts: 6 Location: Russia
|
|
Posted: Tue Oct 10, 2006 9:51 am |
|
|
Thank you rberek. It is work!!! |
|
|
40inD
Joined: 30 Jul 2007 Posts: 112 Location: Moscow, Russia
|
|
|
|