PDA

View Full Version : Serout2 and Serin2 problem



MrSafe
- 24th July 2007, 22:19
Hi, I managed to get my arrays working thanks to the people who helped me with that. However now I have a new problem from some reason the receiving unit is not receiving any data I am not sure what I'm doing wrong. What I am trying to do is take data from the TX unit and transfer it to the RX unit. The TX unit takes data from a 4x4 keypad which is then stored within a string or an array and then transfered by pressing the enter key or key 15.

In the attached files one is the TX unit and the other is the RX unit code I have also included my Serin2 which will not work.

mackrackit
- 25th July 2007, 04:45
Have not studied your code yet but two things I have noticed so far.
1- Serial communications are VERY time sensitive, I did not see at the beginning.


DEFINE OSC 8 'or what ever you are using

This tells the speed that the PIC is running at.

2 - A PortA pin is used for the serial. If the PIC has an ADC you will need to make that pin a digital I/O

Another thing to do. Instead of making the whole code at once (the problem could be any where) start off by making a test code that will say blink an LED to see that the PIC is running while sending something out by serial. Same on receive. In other words, get one thing working at a time. Then start adding to the code.

MrSafe
- 26th July 2007, 00:09
I have tested another method where the data is sent as the user inputs his value and it works fine HOWEVER with the array I hoped to store the inputs the user inputs and then send them out by one by using the string command for the method that sends each input as it is inputed I used serout not serout2 because from what I understand serout will not work with str commands

mackrackit
- 26th July 2007, 04:33
MrSafe,

I take it that you have the PICs talking to each other now.:)
If you have not seen this current thread, http://www.picbasic.co.uk/forum/showthread.php?t=6778
it might interest you.