arduino icon indicating copy to clipboard operation
arduino copied to clipboard

problem with Teensy3.6 and Teensy4.1 CN0391 code, no serial monitor

Open BastiaanMDC opened this issue 5 years ago • 1 comments

Hello Dear Support from analog devices

  1. I recently bought the CN0391 board, and having problems with the CN0391 Example.ino arduino code on my Teensy3.6.

for the MOSI=Pin11, MISO=12, CS=10, and SCK=13. PINS on the CN0391 that are used for the MOSI =4, MISO=5, CS=3, CLK=6,

for the defines in the cn0391 example I have given it:

#define USE_TH_CALIBRATION YES #define DISPLAY_REFRESH (1000)

#define P1_TYPE TYPE K #define P2_TYPE TYPE K #define P3_TYPE TYPE K #define P4_TYPE TYPE K

however if I upload this to the arduino enviroment and Teensy3.6 I get nothing on my Serial Monitor. my cpu speed of the uC =96MHz. I dont know if that matters, however it is written that the statements used in the SPI protocol of the Arduino enviroment are outdated and newer style of spi start transmission should be used, I dont know how much of that is relevant.

I tried using the commands given by https://www.pjrc.com/teensy/td_libs_SPI.html and all ackwards faults show up in C++ files and files referred to the chip on the Teensy3.6....

I tried running the AD7124 to see if I have a connection but it gives a -2 on the Serial monitor. Just dont know what I am doing wrong or understand. So the serial Monitor is working. and dont know what a -2 resembles....

technically i just want to read out all 4 thermocouples.

  1. What is the fastest speed I can go with four thermocouple readouts 10x second? and how much time do I have left over to send this data to a HX8357 GFX 3.5 inch tft display?

  1. Is there a stripped version of the CN0391 by using the AD7124 commands to just readout the thermocouples and Temperature sensor of the AD7124 at set velocity 10xsec?

  2. I would like to prevent conflicts in sending data, and would like to check on the AD7124 to see if the data arrived at the microprocessor.(crc check). and than send the data to the screen.

thanks for looking into this.

Best regards

Bastiaan

BastiaanMDC avatar Jul 07 '20 11:07 BastiaanMDC

Hi Bastiaan,

1.We only support Arduino Uno with this code, however we do have an example with the ADICUP platform: https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_cn0391 2. This depends on the Power mode that is set for AD7124, to determine the exact value for this a test must be conducted to determine it. 3. You could use the ad7124 driver for a demo application without the other pieces from CN0391 here is the driver: https://github.com/analogdevicesinc/no-OS/tree/master/drivers/adc/ad7124 4. The driver does check the crc you can add a print here to check the status on the screen: https://github.com/analogdevicesinc/no-OS/blob/master/drivers/adc/ad7124/ad7124.c#L105

Regards, Mircea

mirceacaprioru avatar Jul 10 '20 06:07 mirceacaprioru