View previous topic :: View next topic |
Author |
Message |
uni_student
Joined: 01 Aug 2007 Posts: 38 Location: AUckland, NEW ZEALAND
|
FORCE_SW |
Posted: Sat Feb 14, 2009 10:32 pm |
|
|
Hi,
Trying to use the software to generate UART on pin B3 of a pic18F1220. Code is compiling fine. Programming chip fine. Nothing seems to exit out of pin B3. Here is my code.
Code: | #include <18f1220.h>
#fuses HS, NOWDT, BROWNOUT, NOLVP,
#use delay( clock=4000000)
#use rs232 (baud=9600, xmit=PIN_B3, parity=N, bits=8, ERRORS, FORCE_SW)
void main(){
while (1){
putc('a');
delay_ms(1000);
}
}
|
What am i doing wrong? any help appreciated. Cheers |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Feb 14, 2009 11:13 pm |
|
|
1. Post your compiler version.
2. Post a description of the external circuits on Pin B3. If you're using
a MAX232-type chip, give the pin number that you connect to your PIC.
3. Post a description of the connections between your board and your PC.
Give the pin numbers on the DB-9 that you connect between your board and the PC. |
|
|
uni_student
Joined: 01 Aug 2007 Posts: 38 Location: AUckland, NEW ZEALAND
|
|
Posted: Sat Feb 14, 2009 11:20 pm |
|
|
Sorry , fundamental mistake. Just found problem. Should have been xmit=PIN_B1 not xmit=PIN_B3. Thanx for reply but fixed now |
|
|
|