How to read from serial port and display to textbox in vb 2008 and store data in DB?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am new to VB, I am developing a small application done with other parts but the one I present to you now I have failed to accomplish for almost two weeks, have tried different codes from net but none seems to be helpful; I am now having 48 hours to the deadline.
I have three different data coming from PIC16F877A (in simulation) and I have installed virtual com port; now I want to do the following
=The information from serial port is like this "pulse:160 temp: 31C Resp: 92p/min"
(1)To display three data to three different textboxes in vb (2008); from the serial port new information is loaded after every 15 sec so the change has to be reflected to my application
(2)After the information is loaded to textboxes respectively, each has to be compared to reference value as follows 120<pulse>150, 36<temp>37.5, 20<respiration>30 if any reading is not in the range then a button which is used as LED has to turn color to red otherwise it has to be green. I have placed these buttons (three) adjacent to textboxes
(3)I have a table in my sql db, with information of temp, pulse, respiration, date and time: Now I want every time new information is loaded to be stored in db with date and time.
NB: PIC is transporting data through comport1, baudrate 9600, parity bit NONE, data bit 8 and I have COM 1 and 2 as com ports in device manager. (I know and am using visual basic as a language)
Thanks so much in advance, hopeful I will be helped soon.
Regards

View the full article
 
Back
Top