Shop OBEX P1 Docs P2 Docs Learn Events
Hardware Interrupts? — Parallax Forums

Hardware Interrupts?

acridacrid Posts: 4
edited 2005-11-01 16:46 in BASIC Stamp
I´m working on a proyect with BS2 to control temperature. I should use LabView to set the temperature that i want to have, the problem is when i read the A/D converter and send the data to the PC(the data is recebed), but i´m sending the setpoint everytime to the BS2, it recibes the setpoint perfectly, the problem is the delay produced by the SERIN command, it makes the data to the PC to arrive in wrong order.
I try to control from the pc, i sent the data to activate a fan(cold) or a light(hot), to control the temperature.
Now i´m trying to make the BS2 control the temperature, but i need to send the setpoint, there is the same problem, the time delay that the SERIN command produces, are there anyway to avoid this?
Do the BS2 have harware interrupts?

Comments

  • cyberbiotacyberbiota Posts: 79
    edited 2005-10-30 19:21
    Mondaca-

    The BS2-p series modules have a polled interupt mode which is implemented in software, but none of the devices have a true hardware interrupt.

    peter

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-30 19:44
    You might consider adding flow-control to your program and using a full interface; the PC is buffered and may be expecting a buffered partner -- by using flow control the BS2 can let the PC know when it's ready to receive serial data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • acridacrid Posts: 4
    edited 2005-10-31 00:57
    Thanks, i have used some flow control in my programs. The PC send a control word tohe PC process the BS2, then it reads the ADC, the BS2 send the data to the PC. The PC processes the data, and send another control word to the microcontroller to turn on the fan or the light.
    The PC makes the control, but i will need to control the process with the BS2 in my next proyects.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-31 17:56
    Typically flow control is implemented via XON/XOFF or RTS/CTS, the method you are talking about is software control or XON/XOFF. Do a google search on RTS and CTS and RS232, this is a more robust method of flow control. Here is an overview of both methods http://www.lammertbies.nl/comm/info/RS-232_flow_control.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • acridacrid Posts: 4
    edited 2005-10-31 19:00
    thanks it will help me, i have tried a lot of things to solve this problem, i hope that using XON/XOFF will solve the problem..
  • acridacrid Posts: 4
    edited 2005-11-01 16:46
    Thank you very much, for the help and the info.

    I used xon/xoff flow control, thanks for the link Paul.

    There are the programs i made. The PC program is for LabView 6.0.

    Regards
Sign In or Register to comment.