Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Wireless ADC value transmission....

Status
Not open for further replies.

Mr CCE

New Member
hi there,

Lately I've been working on a project that involves reading a potentiometer value, and then converting the analog data obtained to digital values using the ADC module of the PIC16F877A.

Now I want this data to be transmitted to another mcu by "Serializing" the data. For this purpose I used MC145026/7 encoders, but the thing is, I'm kinda stuck on writing the mcu software for these chips. You see, these modules encode each 4-bit stream of data with a respective address.

The reason why I'm using these chips is because I'm gonna use RF modules to transmit the data and these chips proved to be very efficient in all of my RF projects, however the main difference between these projects and my latest one is that in this project data is changing continueously(According to the potentiometer).

what's happening is that the transmitted values are always changing and I don't know why. I'll attach the program that I've written so far.

regards.
 

Attachments

  • ADC_Tx.bas
    880 bytes · Views: 151
  • ADC_Rx.bas
    679 bytes · Views: 145
Last edited:
You seem to be rather forgetting you're using a PIC - check my tutorials for how to do this sort of thing with no extra chips, using Manchester coding. As I recall those 'encoders' are very poorly named, they are crude remote control chips, not data encoders like you perhaps thought?.
 
mr CCE

I have just got my project working using a 12f675 TX and a 16F676 RX
I switched to manchester encoding on nigels advice and all is good

The only thing iam looking at is averaging the adc reading to give me a little more stability
cheers
bee
 
Thanks nigel
The thing is pretty stable now amp is good,manchester coding is good
Its one of those things you cannot leave alone if it can be improved slightly ie; averaging

bee
 
This thing worked!

Hi everyone,

I've been working on these IC's and they finally worked (You see how stubborn I am- LOL) but now I'm having trouble with getting a definite output.

The thing is, I've set up a potentiometer at the Rx side to work as feedback for my control system. What I'm doing exactly is that I'm rotating a potentiometer at the Tx to control a Geared DC motor at the Rx.

In my program, i wrote the following:
- If the feedback value > (received value + tolerance range) then rotate in direction 1 and do an ADC check after each move.

- If the feedback value < (received value - tolerance range) then rotate in direction 2 and do an ADC check after each move.

- If (received value - tolerance range) < feedback pot < (received value + tolerance range) then do nothing

the problem is that the third if statement is never reached!

What gives?

regards
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top