Matt, do you have the 2 LABX boards hooked to a common power supply? You should have a common ground between them. ADCON0=0 disables A/D too
Matt, do you have the 2 LABX boards hooked to a common power supply? You should have a common ground between them. ADCON0=0 disables A/D too
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Yes, I have a common ground. What do I want for my ADCON settings?
Right now I am using the codes that where given to me by skimask, unchanged.
Well guys, thanks again for your time, it's unimaginably nice to have people to ask questions, instead of manuals...Lol. But I need to sleep, I have a rather large amount of family events to contend with tomorrow, so I need to turn in. Hopefully sleeping on it will give me an idea.
Matt
Alright...time to completely forget ALL about this serial business...
TX Side:
Should flash an LED connected to PortD.0 once per second, 1/2 on, 1/2 off...Code:DEFINE OSC 20 'Defines oscillator rate ADCON1=$ff : Output PortD.0 'output on PortD.0 LOOP: PortD.0 = 1 : pause 500 : PortD.0 = 0 : pause 500 : goto loop END
RX Side:
PortD.0 on the TX, connected to PortB.7 on the RX.Code:DEFINE OSC 20 temp var byte : Input PortB.7 Loop: if PortB.7 = 1 then 'checks logic level on Portb.7 PortB.0 = 1 'if it's high, set B.0 high else PortB.0 = 0 'otherwise set it low endif temp = temp + 1 : portB.1 = temp.7 'increase the temp variable, and set b.1 to match the temp variable's bit 7 goto loop END
LED connected to PortB.0 <- follows PortB.7, which should follow PortB.7
LED connected to PortB.1 <- should flash quickly showing that the loop is running...if you think it's flashing too fast to see it, change temp var byte to temp var word and change temp = temp + 1 : portb.1 = temp.7 to temp = temp + 1 : portb.1 = temp.15
If that doesn't work, you've got hardware and/or config problems somewhere and it's time to write a blinky for both individually and get the pins themselves working.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
I completely redid the code and got it working, using information from this thread, and
others on this site, finally. I am not sure exactly what was wrong with the other one, but I am assuming it was a config issue, since this code seems to work, maybe the addition of a qualifier too. Regardless, I probably wouldn't have been able to figure it out without your help.
Thanks for your time and help, it saved me days of flirting with manuals and project books.
Matt
Bookmarks