stoyanoff
Full Member level 4
Hi, everyone! I made a simple pcb with PIC18F2550 and MAX232. Here is the hardware: https://dox.bg/files/dw?a=3b528d5ba9
So the controller works fine. It recieves data from the line(I`m using PC for transmitter). But when I tried to send data from the microcontroller it doesn`t send anything. Here is my code:
It just blocks any the debugger can`t pass the #use RS232 line... I remove the MAX232 but again even without anything connected to it`s pins the microcontroller blocks there and it doesn`t transmit anything.
Do you have any idea what`s going on here??
Thanks!
So the controller works fine. It recieves data from the line(I`m using PC for transmitter). But when I tried to send data from the microcontroller it doesn`t send anything. Here is my code:
Code:
#include <18F2550.h>
#fuses HS, CPUDIV1, NOVREGEN, NOPBADEN, NOWDT
#use delay(clock=20M)
#USE RS232 (baud=9600, xmit=PIN_C6,rcv=PIN_C7,BITS=8,PARITY=N,ERRORS)
void main()
{
while(1)
{
putc(5);
}
}
Do you have any idea what`s going on here??
Thanks!