Search results

  1. J

    Teensy 4.1 for PWM Input, Ethernet, UART, and CAN Network?

    Capturing PWM signals on Teensy is very easy. Below is sample code. int interrupt_pin = 10; uint32_t pwm_start; uint32_t pwm_width; bool pwm_data_ready = false; void pwm_isr(); void setup() { attachInterrupt(interrupt_pin, pwm_isr, CHANGE); } void loop() { if(pwm_data_ready == true)...
  2. J

    CAN Bus Pins

    You are correct, TX goes to TX. This board has the two 120 ohm terminating resistors. If you are connecting this device to an existing CAN bus network, you will have to remove those resistors. If you are building your own network, only one of these boards will need the resistors. John D
  3. J

    CAN Bus Pins

    Al, The pink squares labeled CRX# and CTX# are the CAN Bus pins. The device you have at the bottom with the MCP2515 chip is a standalone CAN controller using SPI for communication. It is not needed on the Teensy as it has CAN controllers built in. The SN65HVD232 is a CAN transceiver which you...
  4. J

    Sending data into Teensy 4

    Using the Serial library would be the easiest way. https://www.pjrc.com/teensy/td_uart.html
  5. J

    FlexCAN can only send globally defined CAN_message_t

    You have "CAN_message_t msg" declared twice. Once in the header file and another in the Cansender constructor. Remove the "CAN_message_t msg" from the constructor and it should work.
  6. J

    Need help with CAN bus...

    I am currently using the FlexCAN library included with Teensyduino with the same transceiver as this product, I’ve got mine on a custom PCB. It is very easy to use. You won’t have loopback mode with the Teensy and this library. From the picture, this board has a 120 ohm resistor onboard. It is...
  7. J

    MISO pin conflict

    Hello, Pin 39 is labelled as a MISO pin, not a CS pin. I had a similar issuing using the nRF24 modules. I put 10K pull-up resistors on the CS Line and it worked. https://www.pjrc.com/better-spi-bus-design-in-3-steps/ John
Back
Top