guidance needed with CN0391 Thermocouple, and TFT over SPI to Teensy4.1

Status
Not open for further replies.

Bastiaan

Well-known member
Hello people of the PJRC,

I am currently building a horseshoe electromagnet with glycol cooling of around 800W. 1Tesla goal 1.5Tesla.
i use 2 peltiers motor and an electromagnet to drive and measure the current and watch for alarms.
furthermore i use 1 of the two encoders to set the temperature and PID them and with HBridge drivers to drive the Emagnet and both Peltiers.
furthermore the data from the hbridges are mostly analog and manipulated by opamps to give the maximum range on the analog inputs 4x. opa365 or tlv2474
I would like to use the teensy4.1 its dandy and fast.

for the display I am using the TFT display adafruit featherwing 3.5" 480-320. and CN0391 from Analog devices. both work on SPI.
however this my first try in combining two spi lines on same pins,

so my approach is at first to multitask on the microprocessor by using the ( previousmillis-millis) and wait for a period of time to send and collect the data to the featherwing to update the 4 simultaneous thermocouple values on the screen. https://wiki.analog.com/resources/tools-software/uc-drivers/ad7124.

I dont know how to approach or where to start combining the data of the SPIS would this be an approach?

Chip Select TFT
Start with the screen
refresh screen

Chip select to CN0391.

start SPI for CN0391
wait for data
check previous sample data
converse the new data
stop the data
send the data to the microprocessor
process it
send the data to the screen.

I am not sure how to update the screen and how to implement the 2 encoders as well.

I have experience with 1 encoder and a menu which can be scrolled and values for a start stop interval timer for a led driver can be set accordingly.
I have the idea that this approach is going to be similar.

but would like to get an second opinion

I hope all of this makes sense.

best

Bastiaan
 

Attachments

  • teensy4.1 board with all inputs and outputs.jpg
    teensy4.1 board with all inputs and outputs.jpg
    75.7 KB · Views: 49
Status
Not open for further replies.
Back
Top