fpauker 9d305c318c 'README.md' ändern | 5 vuotta sitten | |
---|---|---|
README.md | 5 vuotta sitten |
The following API source codes should be run under the bcm2835 library. Click to download bcm2835-1.39 libraries or bcm2835-1.45 libraries, which can also be found from http://www.airspayce.com/mikem/bcm2835/
Connect the High-Precision AD-DA Board to the Raspberry Pi. Jumper settings:
Make the files: Enter the directory ADS1256, and execute
´´´make´´´
to compile it. Execute sudo ./ads1256_test Note: if it prompts command not found, please use chmod +x ads1256_test to add execute permission. Block the LDR from light and then the voltage of channel AD1 will be changed. Turn the potentiometer and the voltage of channel AD0 will be changed. In the end, press Ctrl+C to suspend the current process. Digital to analog conversion Connect the High-Precision AD-DA Board to the Raspberry Pi. Jumper settings: Set the Power Supply to 5V: connect the pin 5V and VCC. Set the Reference Input Voltage to 5V: connect the pin 5V and VREF. Connect the pin DA0 to LEDA, the pin DA1 to LEDB. Then the brightness of LEDA indicator will be changed according to the voltage output of DA0 and the brightness of LEDB indicator will be changed according to the voltage output of DA1. When using SSH for terminal control, please connect the network cable. The software PuTTY should be installed. Power up. Copy (using a USB drive as a carrier) the source code, DAC8532, to the Raspbian OS. Note: the system will detect the USB drive directly under GUI, else if using SSH Connection, the USB drive cannot be operated until it is mounted to the Linux. Search the key words “Linux mount” for more details. Make the files: Enter the directory DAC8532, and execute make to compile it. Execute sudo ./dac8532_test Note: if it prompts command not found, please use chmod +x dac8532_test to add execute permission. Expected result: the brightness of LEDA and LEDB changes gradually. Interface Definition Pin Symbol Description 1, 17 3.3V Power supply (3.3V) 2, 4 5V Power supply (5V) 3, 5, 7, 8, 10, 18, 22, 24, 26, 27, 28, 29, 32, 36, 38, 40 NC NC 6, 9, 14, 20, 25, 30, 34, 39 GND Ground 11 DRDY ADS1256 data ready output, low active 12 RESET ADS1256 reset input 13 PDWN ADS1256 sync/power off input, low active 15 CS0 ADS1256 chip select, low active 16 CS1 DAC8532 chip select, low active 19 DIN SPI data input 21 DOUT SPI data output 23 SCK SPI clock 31, 33, 35, 37 GPIO extend to sensor interface