Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

A / D Conversion

<^< Port B Interrupt | Course Index | Busses >^>

Largely simplified block schematic to demonstrate where the A/D Converter is located in the PIC 16F1937 Architecture:

A / D:

  • This 16F1937 PICmicro microcontroller has 14 pins that have an extra A/D function.
  • This PICmicro controller has only one single 10-bit A/D converter.
  • This implies that these 14 analogue inputs can't all be read at the same time.
  • A built in analogue switch is the answer to this problem.
  • In Flowcode you can select which of the 14 analogue inputs you want to sample.
  • After this 'sample' instruction, the analogue switch is set to the correct input and this analogue input is converted to a 10-bit binary value.
  • In Flowcode, you can select to only use the 8 MSB's of this 10-bit value by using the 'GetByte' instruction, or you can select to use the full 10 bits by selecting the 'GetInt' instruction. The 10 bits will fill up the 10 LSB's of the selected 16-bit integer variable.
  • After this, you can select an other analogue input that needs to be read.

<^< Port B Interrupt | Course index | Busses >^>

Print - Search - Login

Page last modified on May 13, 2013, at 02:54 PM