Hello Bob,
Bob>>loop:
serin portb.7, 1, [value] 'get input
high led
serout portb.0, 1, [value] 'send to pin to compare waves
low led
goto loop
The led never flashes so its just sat waiting for input which it never sees, though the scope sees a nice clean signal on the input pin.
<<
Ok, One thing I see, is that it will only take a very SMALL amount of time to send the data to the output, Thus your LED may be flashing, but too fast.
Can you scope the POrtb.0? and see the data being transmitted? Do not rely on just 1 LED flashing. (which seems you are doing here). It will flash way too fast, and probably look as if it is not flashing at all.
Since you have scoped the transmitter, and have verified it, then the reciever should be almost the same...Try scoping the PORTB.0, and making sure you have data coming out. If not, it is in your receiver... Then I would suggest slowing down your baud rate to 300.
Dwayne
Bob>>I am going to try disabling the A/D before receiving data, but cant see this making a difference, since I'm using port B <<
Will not make any difference if they are not present on POrtb. PortA ususally has all the AD and comparators...
Make sure your TRISB has the proper pins as I/O... according to your example
your input is PORTB.7 and output is PORTB.0
Thus I would (for safety sake)
Portb=%10000000
This assigns POrtb.7 as a input, and all others as outputs.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks