Bi-Direction serial communication PC > PIC *16F84A via RWS-434 TWS-434
I've been trying to obtain rf wireless communication to my pic projects for awhile now... recently I managed to get my pc's serial port to transmit out a TWS transmitter module to the RWS reciever at N2400 baud (yay) i can "trigger" my reciever address "if" statement and get to the underlying functions (i'm hoping these parts of the program can talk to the other pic's and update variables on those which in turn provide the desired functionality. This is a rc robot/car
the recadd byte is next byte out after the "254" qualifier
I then have a variable "bitvalue" ' basically the 0-255 I would like to send to the different PIC's which control various features (motor direction, HPWM motor speed control, various lights, possibly a rototating "platter" for my camera to sit on)
but enough about the PC > PIC transmission... my problem is the opposite, the PIC > PC transmission and recipt.
The problem is my vb program gets garbled data
it looks like this: ûo—ÿû[¸
qH
maybe somebody could post a schematic for connecting both a RWS /TWS to both pic and pc so i know i have my connections right. (especially resistor values)
Thanks
Rws-434 Tws-434a Serin/serout Update
I thought i'd update my post with more information as i am still unable to resolve my receiver difficulties and really require some intervention.
My PC side is like this for hardware:
PC SERIAL PORT TX > PIN2 TWS TRANSMITTER MODULE (works) Sends output of serial port from Visual Basic program using Com 1 2400,n,8,1
PC SERIAL PORT GND > GND
PC SERIAL PORT RX < RWS-434 Data out (have tried both pin 2 "Digital" output, tried pin 3 "Linear" output with 47k resistor to ground, "Linear" is what is used successfully on the remote pic side.) doesnt work or strange charecters received.
The Pic side looks like this:
pin 1 (PortA.2 "serpin" in my pic's software program) to RWS-434 modules "Linear" data output with 47k resistor to ground. (Works) Pic receives data qualifier and procceds through program as expected. The pic side RWS-434 has pin 1 > GND, pin 2 > SOMETIMES TO SERIAL PORT RX, pin 3 > SOMETIMES TO SERIAL PORT RX , pin 4 > VCC +5 (4.9), pin 5 > VCC +5 , pin 6 > GND , pin 7 > GND , pin 8 > ANT.
pin 2 (PortA.3 "serpout" in my pic's software program) to TWS-434A "data in" pin 2.
The 4 antennas (I'd eventually like to use just the 1 on each side) have been swapped in one at a time to the working PC > PIC TWS > RWS part of the circuit so they can likely be ruled out as the problem.
The project is currently breadboarded (3 breadboards actually) with the PC side device (meaning the TWS+RWS+7805C) on a smaller breadboard.
The pic side layout currently is having the Pic and teh tws on a small breadboard with the working RWS on its own breadboard. ( I scrapped a couple of working TX > RX TWS / RWS w/ holtek encoders that i had going to start development immediately of the serial RF modem type communication)
The PIC program is as follows: (sorry for the mamoth post but i thought it be good to post the complete picture)
More of my questions and comments after the code:
(my post is too long i'll re-post my code)
As you can see i'm hoping to eventually Parse the returned data.
But first to get the data over RF from the pic side.
Any ideas on what is my problem... maybe we could move this post to a more appropriate section... i didnt realize i was in the PIC wishlist (oops, sorry)