Hi there my name is Bojan and I'm trying to establish PIC to PC communication for a school project. Yet when I ask my teacher for help i get nothing. So I'm on my own and I've tried to figure this out for about two months now. I'm following a tutorial written by Chuck Hellebuyck "Getting Started with PICs."... i have my circuit breadboarded as seen in the attached file. I attempted using picbasic pro as was outlined in the tutorial but absolutely nothing happened. My teacher then told me to use mikrobasic.. So i tried reading the help files and this is what code i came up with :
program soft_uart_test
dim received_byte, er as byte
dim y as word
y = 56
main:
Soft_Uart_Init(PORTC, 1, 2, 9600, 0) ' Initialize soft UART
while true
do
Soft_Uart_Write(y)
received_byte = Soft_Uart_Read(er) ' Read received data
loop until er = 0
PortB = received_byte
wend
end.
Again nothing really works... i used a logic probe and at the input into my chip i notice that I am receiving a pulse from the computer and it gets to the chip... another problem that i ran into was that when i compiled using mikrobasic... it says Warning:Generated Baud Rate 10000 (error 4.17%).... this project has been killing me... any help would be greatly appreciated... thanks
bojan
program soft_uart_test
dim received_byte, er as byte
dim y as word
y = 56
main:
Soft_Uart_Init(PORTC, 1, 2, 9600, 0) ' Initialize soft UART
while true
do
Soft_Uart_Write(y)
received_byte = Soft_Uart_Read(er) ' Read received data
loop until er = 0
PortB = received_byte
wend
end.
Again nothing really works... i used a logic probe and at the input into my chip i notice that I am receiving a pulse from the computer and it gets to the chip... another problem that i ran into was that when i compiled using mikrobasic... it says Warning:Generated Baud Rate 10000 (error 4.17%).... this project has been killing me... any help would be greatly appreciated... thanks
bojan