Author |
Message |
Topic: How to implement HW UART Rx timeout |
aroman
Replies: 3
Views: 13630
|
Forum: General CCS C Discussion Posted: Mon Aug 16, 2004 12:51 pm Subject: How to implement HW UART Rx timeout |
Hello all,
I am using the hardware USART of a PIC16F876 in asynchronous mode, 2400 bps, 8 data bits, 1 stop bit and no parity. The Rx pin of the PIC16F876 (pin C7) is directly connected to the outp ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 8:50 pm Subject: Question of A/D converter of PIC16F876 |
Bad news: I removed the line that Mark recommended me but I am still getting a result of the A/D conversion that is wider than 8 bits-wide (or at least, that is how I am interpreting it).
If I use ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 10:29 am Subject: Question of A/D converter of PIC16F876 |
OK Mark, thank you very much for your help. I will try it and I will let you know how it goes |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 10:22 am Subject: Question of A/D converter of PIC16F876 |
Yes, my crystal is 76.8 kHz (PIC is in low power mode). Is there a problem with this? That's why I used the internal RC for the clock of the A/D converter.
If I only remove the line that you told me, ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 10:11 am Subject: Question of A/D converter of PIC16F876 |
I would like to have 8 bits resolution in the A/D conversion (not the 10 bits resolution that is by default), and store the result in an 8 bit-wide variable. What do I need to modify in my code to ach ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 9:51 am Subject: Question of A/D converter of PIC16F876 |
Thanks to Mark. On the data sheet, I did not find how to change the resolution for the A/D, but I wanted to ask if it was possible.
I want the result of the A/D conversion right-justified, so I can ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Tue Nov 18, 2003 8:28 am Subject: Question of A/D converter of PIC16F876 |
Thanks to Aztlan for the suggestion, but unfortunately I tried it and the PIC still uses 10 bits of resolution for the A/D conversion. This is the code that I am using on the PIC:
#include <16 ... |
Topic: Question of A/D converter of PIC16F876 |
aroman
Replies: 14
Views: 37548
|
Forum: General CCS C Discussion Posted: Sun Nov 16, 2003 11:58 pm Subject: Question of A/D converter of PIC16F876 |
The A/D converter of the PIC16F876 has 10 bits of resolution. Do you know if there is a way to put it to work with just 8 bits of resolution, instead of 10? |
Topic: Overrun errors using the getc() function |
aroman
Replies: 7
Views: 24310
|
Forum: General CCS C Discussion Posted: Fri Oct 24, 2003 9:17 pm Subject: Overrun errors using the getc() function |
Thanks to Humberto for the suggestion. I modified the code of my receiver to use interrupts instead of polling. However, it seems like the UART receives just one "trash" character, stores it into inte ... |
Topic: Overrun errors using the getc() function |
aroman
Replies: 7
Views: 24310
|
Forum: General CCS C Discussion Posted: Sat Oct 18, 2003 3:24 pm Subject: 14th character lost |
Thanks again to Mark. I followed his suggestion, and the issue reduced. However, I also had to include a “non-confundible” character (a 0x00, because it has a waveform that cannot be confu ... |
Topic: Overrun errors using the getc() function |
aroman
Replies: 7
Views: 24310
|
Forum: General CCS C Discussion Posted: Thu Oct 09, 2003 7:18 pm Subject: Overrun errors using the getc() function |
Thanks Mark and Ttelmah for your help. I modified my code based on your recommendations and I got rid off the overrun error.
However, now I have another problem: I am transmiting a 65 in decimal, ... |
Topic: Overrun errors using the getc() function |
aroman
Replies: 7
Views: 24310
|
Forum: General CCS C Discussion Posted: Mon Oct 06, 2003 1:07 pm Subject: Overrun errors using the getc() function |
I am relatively new to PIC and C programming. I am writing a program that uses the getc() function of the CCS PIC C Compiler to read data on the RC7/RX pin of a PIC16F876. I review with an oscilloscop ... |
|