![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2008
Posts: 2
OS: xp
|
vb code request for private data logger
Hi, i had a a lot of trouble trying to build a software to read my data logger which i built lately. I will explain all my specification i would want my simple program to run.
First, it uses parallel port pin ( d0,d1,d2,d3) to receive data only. I want to received the sensor data in this order of arrangement. Because the total data i will be receiving for each sensor is 12 binary data, i will be sending from my PIC16F877A for 3 times each time is 4 bit shifted out. Example of data received, 0001 1010 1111. The data will send in 0001 first and 1 sec delay till 1010 came in and lastly 1111. I want to have it arrange became 1111 1010 0001. Then from the reading of 12 bit the 2 first bit will be my control bit to be used in case for working out the formula for each sensor. Basically i have 3 sensor i have set in my PIC to send in 01 for humidity 10 for temperature and 11 for pressure. The next sequence is to identify the control bit accordingly and have a variable for that type of sensor under a case. After having the sensor type selected in the case, For humidity conversion is as below, RH= (D/1023) x 2.45 , where D is the decimal for that particular sensor under control bit 01 after getting the value for RH compare it to the case value below, < 0.74 = <10%RH > 0.74 = >10%RH > 0.95 = >20%RH > 1.31 = >30%RH > 1.68 = >40%RH > 2.02 = >50%RH > 2.37 = >60%RH > 2.69 = >70%RH > 2.99 = >80%RH > 3.19 = >90%RH Then, stored %RH into the database value array with timestamp and move to the next sensor data conversion, temperature the decimal value obtained for control bit 10 is for temperature and the conversion is as below T = ( D/ 209) x 26 and stored the temperature value in value array lastly pressure sensor at control bit 11. S = (D/1023) x 4 P = ( S - 0.4105 ) x 15.5767 Store p value under value array for pressure After done all this the database text pad should have the following array Time | Sensor type | Binary | Decimal | Value And not least, the graph plotted out according to the value x time stamp. It's hard for a newbie to do all this, so i really appreciate if anyone mind helping me out for this private application i am trying to build. VB6 user |
|
|
|
![]() |
| Thread Tools | |
|
|