This week I am itching to start some program development using the PIC32 processor. We already have the freeRTOS ported to the processor. We established 3 empty independent tasks. I plan to add code to one of the tasks to control a Microchip MCP3202 CI/P chips. It is a dual channel 12–bit analog to digital converter.
Notice the control lines on the right:
SCK1 is serial clock, SDO1 is serial data output, SDI1 is serial data input. These lines are all associated with SPI interface 1 of 2. SPI (serial peripheral interface) may be connected to many SPI devices and all share these 3 lines. Each part has a chip select. This signal is ADC2. When asserted low, the processor is talking to this part.
Link through Mouser Electronics to pdf data sheet For the breadboard, I am using the dip part. Click on the data sheet to view the details.
I selected a thermistor that can be used to monitor the temperature of each MOSFET.
Each thermistor is placed under a screw head that mounts a MOSFET to the thermal block. The manufacturer provides a table of resistance values for the selected thermistor. It has been years since I created an interpolation table but it is no big deal. See the attached spread sheet. I notice VISHAY has one column that is a ratio of the thermistor resistance/ thermistor resistance at 25 degrees C. The column is per degree C from -40 to 125C. We are really not after absolute accuracy but a responsive reading of the thermistor. The processor task is to read the A/D values on a regular value, convert to degrees C and put the data in the data base.
To get my feet wet with the new programming effort, I am constructing a bread board for the A/D chip and sensor. A flat cable will wire the signals over to the processor.
I will resume the BLOG after I get the connections figured out and the breadboard constructed.
73 K5OOR – Virgil
Join the project. Send me an email: firstname.lastname@example.org