Here we discuss how to use the ADC chipset TLC1543 with Raspberry Pi B+.
1. Configure A0 pin to be ADC pin.
1) Install libraries as shown in steps shown here.
2) Set the jumpers to select the reference voltages:
- When REF is connected to 5V, the reference voltage of ADC is 5V (by default).
- When REF is connected to 3V3, the reference voltage of ADC is 3.3V.
- Note: only one at once.
3) Copy program/AD_TLC1543 to Raspberry Pi B+, and run the following commands:
$sudo make $sudo ./tlc1543
4) The terminal will print out the AD value, which is by default the AD0 of TLC1543, or T_A0 of the Arduino adapter hat.
5) If T_A0 is connected to A0, A0 of Arduino headers can be used as the AD converter pins.
2. Configure other ADC pins
1)If we want to print ADC of other pins of TLC1543, we need to edit file tlc1543.c:
$sudo nano tlc1543.c
Locate the following line:
re=ADCSelChannel(0);
Change the zero there to be other number that corresponds to the T_Ax. Press Ctrl+X and select Y to save.
2) Type the following to execute:
$sudo make $sudo ./tlc1543
Leave a Reply
You must be logged in to post a comment.