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 CCS Technical Support

CCS C & MPlab v7.6 simulator

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







CCS C & MPlab v7.6 simulator
PostPosted: Sat Jan 12, 2008 9:41 am     Reply with quote

Hi there,

I am trying to simulate a PIC16f690 in MPlab using:

Code:

#include <16f690.h>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT
#use delay(clock=20000000)
#use rs232(baud=19200, UART1, ERRORS)

void main(){
ENABLE_INTERRUPTS(GLOBAL);
enable_interrupts(INT_RDA);
while(1){
}


#int_RDA
data_handler(){
byte data;
data = getc();
putc(data);
}




And I am using the following as a stimulus:

Code:

61 62 63 20
wait 10 ms
63 62 61
wait 50 ms
"THE QUICK BROWN "
"FOX"
WAIT 200 ms
65 66 67 68 13 10 69 70


I'm getting a few correct characters but multiple instances of "UART-W0001: Overrun, write occured over a full TXREG SFR. Data lost" in the error window.

I have tried a low baud (9600) and the same happens.

Please advise,

Peter
SET



Joined: 15 Nov 2005
Posts: 161
Location: Glasgow, UK

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jan 14, 2008 9:51 am     Reply with quote

Maybe you are not allowing time between incoming characters (pacing delay) - Im assuming your stimulus comes from a file?
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