HI,
I have a question how can I do a little routine that when my PIC Connection to my pc is lost for ex. 30 seconds a sound is generated to my portd.1.
I have tryed with this code but i have another problems when I put the command sound.
I have a PIC 16F877 and a RS485 ----> RS485 ---> RS232 ------> PC.
'*******************************Main Routine*******************************************
Main: ' Main Routine
NoRX = 0
low portd.0
i = $0
counter = 0
IF RCIF Then
NoRX =NoRX + 1
i = RCREG
serialstring[counter]=i
counter=counter+1
IF i ="!" Then CheckChar2
EndIF
if NoRX = 0 then SOUND PORTd.1,[110,200] ' Here is my problem
GoTo Main
When I put the command sound I lost my connection to PC I can not send data I dont know why ?!
Thanks.
regard Pesti.
Bookmarks