Author |
Message |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Mon Apr 07, 2008 5:16 am Subject: RS232 UART Interrupts |
Keywords. 'Positioned just after'. This is terrifyingly suspicious of an array access, or pointer access that is going just a little further than you think it is. Classic things would be forgetting th ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Sun Apr 06, 2008 11:31 pm Subject: RS232 UART Interrupts |
Here is the assembly listing for the memset function in v4.057:00004: MOVLB 2
00006: TSTFSZ x18
00008: BRA 0010
0000A: TSTFSZ x19
0000C: BRA 0012
0000E: BRA ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Sun Apr 06, 2008 1:12 pm Subject: RS232 UART Interrupts |
There is something wrong with memset function when it was called with
size > 256. I have used it with 512.
From the CCS manual:
MEMSET( )
Syntax: memset (destination, value, n)
Des ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Sun Apr 06, 2008 9:15 am Subject: RS232 UART Interrupts |
...when I does not use send char within the interrupts it works fine...
Can you post the code that works fine?
Robert Scott
Real-Time Specialties
After 3 weeks hard work I think I have found ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Wed Apr 02, 2008 7:12 am Subject: RS232 UART Interrupts |
...I had a version that sets one flag in INT_RDA when I need to send a char and then after 50 cycles of Timer2 interrupt I set the TXREG register if it is empty. This does not helped too ...
Then m ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 11:42 pm Subject: RS232 UART Interrupts |
Here is a possible problem. According to the timing diagram in the 18F series datasheet, the RCIF interrupt flag is set at what looks like the middle of the stop bit of the received character. That ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 11:37 pm Subject: RS232 UART Interrupts |
1. The program is missing the #use rs232() statement.
2. Tell us what this program is supposed to do.
3. Did you test the program and confirm that it fails ? Describe
the failure. Tell us ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 2:01 pm Subject: RS232 UART Interrupts |
Here is my snippet.
#include <18F4620.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz)
#FUSES P ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 1:50 pm Subject: Re: RS232 UART Interrupts |
What you are doing sounds very confusing. You say that the RX pin is connected to the TX pin. So TX is driving RX pin on the same PIC, so the PIC can talk to itself. But then you say that a charact ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 1:26 pm Subject: RS232 UART Interrupts |
Post a very short program that demonstrates the problem. Don't post
200 lines of code. The program must be complete, and compilable
with no errors. Test the program before you post it.
Lo ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 12:55 pm Subject: RS232 UART Interrupts |
the flag that will block first incoming character (to block the echo).
You must read the characters from the UART receiver. If you don't
do this, you could get an overrun error and the receiver w ... |
Topic: RS232 UART Interrupts |
ob5erver
Replies: 23
Views: 46136
|
Forum: General CCS C Discussion Posted: Tue Apr 01, 2008 12:32 pm Subject: RS232 UART Interrupts |
Hello,
I am having very strange problems with serial interrupts.
Let me try to explain the situation:
The device is PIC18F4620. The RX pin is connected to TX pin.
RS232 was set up with this
... |
|