Discussion in 'Embedded Systems and Microcontrollers' started by navidbox, Jul 13, 2011.

  1. navidbox

    Thread Starter Member

    Mar 6, 2009
    Dear all,

    please kindly help me with this.

    I need to send four measurement parameters to the PC for display and storage purposes. The software for this aim is LABVIEW. I am new to PIC and Interfacing, but by putting so much effort and asking questions from experts, i could have accomplished the acquisition of all the data till today. ( PIC16F877A, C language with Hi-tech compiler and using PROTEUS as simulator)
    I could also transmit a character "HELLO" through RS232 with my UART to USB converter and the result in hyperterminal was observed as well.
    I am quite happy that i could have reached up to this stage. but on the other hand, unfortunately my knowledge is absolutely poor about LABVIEW.
    I have heard that if i have control over the format of the data from PIC to LABVIEW, it is not that difficult.
    Please find the attached pictures of the design for better understanding.

    1- can you please explain what is the technique to transmit the 10-bit data from PIC ADC to the 8-bit serial port? something like this:

    do {
    for (i=0; i <=7; i++) {

    for (i=0; i <=7; i++) {
    putch (Lo(myarray)); //send the lower 8 bits of ADC reading
    putch(Hi(myarray)); // Send upper 8 bits of ADC reading

    2- How to identify each channel at the reception side (LABVIEW). For example, 1011011110=Channel 0 (ADC-1=Light) or 1011010110=Channel 1 (ADC-1=temperature) and so on. Something like this can work?

    do {
    an0 = ADC_Read(0) >> 2;
    an1 = ADC_Read(1) >> 2;

    an2 = ADC_Read(2) >> 2;

    an3 = ADC_Read(3) >> 2;

    an4 = ADC_Read(4) >> 2;

    Thanks in advance for your help.
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    Double posting please continue HERE And also describe what you have done so far. And why and how you struggle. Good question draw good answers. Do you have any Labview code post that also.
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    with this accomplished, you should be able to read your chars into Labview to confirm connection.