|
|
View previous topic :: View next topic |
Author |
Message |
Peterstorm Guest
|
CCS C & MPlab v7.6 simulator |
Posted: Sat Jan 12, 2008 9:41 am |
|
|
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
|
|
Posted: Mon Jan 14, 2008 9:51 am |
|
|
Maybe you are not allowing time between incoming characters (pacing delay) - Im assuming your stimulus comes from a file? |
|
|
|
|
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
|