How to use 2 sensors??

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: How to use 2 sensors??

Post by Benj »

Hello,

On one of the sensor boards you will have to move the jumper to the patch position and then wire a link from the Microcontroller pin you wish to use to the ANASEN pin of the patch system. This should allow two analogue sensors to work together.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: How to use 2 sensors??

Post by Benj »

Hello,

Hm thats strange pin 5 (RA5) should be ok for the second analogue channel with the original analogue channel on pin 3 (RA3).

Which chip are you using and are you wiring a connections from the +V terminal of the multiprogrammer to both of the sensors boards?

Are either of the boards working correctly at the moment?

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: How to use 2 sensors??

Post by medelec35 »

I maybe telling you something you already know, but just encase...
Random numbers are produced because pin on the microcontroller the flowchart is reading from is floating, as though nothing is connected to it.
So either wrong ADC channel is selected in flowchart for the pin to be measured, or there is an open circuit from the device plugged into the Sensor or from pin3 of P1 to pin 5 of P2 or from pin 5 of P2 to pin 8 of PIC16f877A

If you have a multimeter, with power unplugged to programmer board check there is about 220R from pins 5&6 of J6 and pin 8 of 16F877a.
If there is then best to re-check flowchart.
If not, it should be straight forward to fine out where open circuit is.
Hope this does help, and I have got it right of course.

Edit: Just a thought.
If you disconnect wire from pin 5 of P2, then connect the wire to +5V or ground, then if display shows 255 or 0, then you can tell if it's OK (software and hardware) Don't short analogue device o/p, as I would not know if it would get damaged or not.
Martin

Post Reply