CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC18F452 & Proteus

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Angelo



Joined: 06 Oct 2006
Posts: 6
Location: Russia

View user's profile Send private message

PIC18F452 & Proteus
PostPosted: Fri Oct 06, 2006 8:35 am     Reply with quote

rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Sat Oct 07, 2006 7:51 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 10, 2006 9:51 am     Reply with quote

Thank you rberek. It is work!!!
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Thu Dec 11, 2008 10:56 am     Reply with quote

When I try to simulate this code:
http://www.ccsinfo.com/forum/viewtopic.php?p=74157#74157
http://www.ccsinfo.com/forum/viewtopic.php?t=19255
in Proteus for PIC18F452 or 18F4620 I get nothing or get zeroes in address strings.
When I simulate this code compiled for 16F877 it works fine.
I can't understand why this code does not work for 18 series?
Oscilloscope shows continuous impulse train about 5 us in period.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group