Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BastiaanMDC opened this issue Jul 7, 2020 · 1 comment

Comments

@BastiaanMDC
Copy link

BastiaanMDC commented Jul 7, 2020

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

@mirceacaprioru
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants