2 Attachment(s)
2 am - Given up now - Can't figure out the problem. Using DT_Int. PLEASE help
Am I going crazy or is there something really dumb I am doing here. I have a 16F72 sending few serout commands, 16F877A should accept it and make it's port pins high/low accordingly.
I am using DT_Int to get a momentary function on 6 pins. Two should be latching. No other pin should go high if any other of the 8 pins is high.
My dear 877A is not happy with me. It works sometimes, sometimes only 4 pins work, ( Yes I have MCLR tied to 5V).
I have to do everything manually and don't have any simulation software. But after making changes, trying new ways and reprogramming nearly 1 billion times now, I am so close to give up as I can't figure our what is wrong with what!
Please have a look to my code and show me the light.
Your help is greatly appreciated.Attachment 5754Attachment 5755
Re: 2 am - Given up now - Can't figure out the problem. Using DT_Int. PLEASE help
I see no trace of your ISR.
Re: 2 am - Given up now - Can't figure out the problem. Using DT_Int. PLEASE help
Hi Charles, I am using DT_Int s, the label Togglefast is an ISR in the Rx code.
Re: 2 am - Given up now - Can't figure out the problem. Using DT_Int. PLEASE help
You Are sending twice the same code and then you compare code1 with code to see if same value. This is wise but is giving you problem with the synchronism since you have no handshaking.
Suggestion: remove the compare feature and work with a single byte sent. If your code works has you expect then re-install the double sending feature and try with a higher baud rate (9600) and with a delay between the first byte and the second one (this on the device that Tx the byte)
Cheers
Al.
Re: 2 am - Given up now - Can't figure out the problem. Using DT_Int. PLEASE help
Quote:
Originally Posted by
aratti
You Are sending twice the same code and then you compare code1 with code to see if same value. This is wise but is giving you problem with the synchronism since you have no handshaking.
Suggestion: remove the compare feature and work with a single byte sent. If your code works has you expect then re-install the double sending feature and try with a higher baud rate (9600) and with a delay between the first byte and the second one (this on the device that Tx the byte)
Cheers
Al.
Thanks Al. My baud cannot increase to beyond 2400 because of other hardware limitations. I use the same format in every other PIC I use, and it works. But this combination of 676 & 72 has made me crazy. Currently everything is on my breadboard. Rx is fully responding to the first few signals on the Tx but not ALL.