Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Comparing data both sent through uart pic16f877a

Status
Not open for further replies.

joeschmoe

Newbie level 3
Newbie level 3
Joined
Apr 14, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
Comparing data both sent through uart from PC to pic16f877a

Hi guys i'm pretty new to using UART and i was wondering how i could compare and differentiate two separate pieces of data. Basically this is the set up:
I have a load cell that is connected to a max232 circuit. When pressure is applied, the values are sent to a laptop via max232 circuit (rs232 to usb). Then torque is computed. This is to be compared to a desired torque, input by the user at the pc. Both of these data are then sent to a PIC16F877A using UART(max232 usb to rs 232). I just need to be able to differentiate the two values of Torque in a MikroC program. I hope you guys can help. Thanks a lot!
 
Last edited:

it sounds like you need some simple PC program with GUI to do this. Normally for a PC skilled programmer it should not take more than 2-3 hours to complete it. I'm afraid that it will be much more difficult to find a ready PC software which can fit exactly to your needs (but it's possible for sure to find such software)
 

hi thanks for the reply! Actually this is a joint project with a friend and he already made the GUI i just need to use the data sent to the PIC16 and differentiate them to be able to use them in an if statement. i have to compare them and control a motor based on if the user input is greater than, less than, or equal to the torque read by the load cell.
 

I was doing the same thing in my previous project . i used C# for my GUI. What i did is to use string to compare the value i set and the one's being receive.if your are using nested if with multiple if-then else, i suggest use switch-case to avoid unnecessary problem. You may used the data coming from PIC then process it in the PC using the GUI you created and result will now be sent back to PIC depending on the conditions. let the PC do the processing and PIC do the action based on the result. Hope this helps
 
Thanks bbgil for the reply! It helped a lot!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top