Search results

  1. PaulS

    CAN BUS Message Issue Transmiting with Teensy 4.1 and BAMOCAR d3 controller using FlexCAN_T4

    Have you tried swapping the RX and TX lines to the transceiver? Some transceiver boards have a confusing way to indicate what the RX and TX connections are. Paul
  2. PaulS

    Teensy 4.0 / High Voltage Heater

    Yeah, I concur... Looked through both LIN Description Files that you shared in message #101, buth ID 39 (DEC), 27 (HEX) is not mentioned as an ID that returns data (or can be sent data to, for that matter). It is interesting though that all 3 heaters return a different CRC value. It could mean...
  3. PaulS

    Teensy 4.0 / High Voltage Heater

    Hmm, interesting. Although I'm under the impression that you need to issue a lin.response command to ID 0x3C/0x3D to get a message back? Did you also see a lin.response frame from ID 0x27? My code sends it every 100ms, so should be visible as well. PS: I'm going off-the-air now for the rest of...
  4. PaulS

    Teensy 4.0 / High Voltage Heater

    Weird, I see ID 0X3D on your scope. Did you change this line in your code: uint8_t responseID = 0x27;. BTW, you can zoom in by turning the horizontal knob clockwise and then you use the horizontal "position" knob to shift the image to the left.
  5. PaulS

    Teensy 4.0 / High Voltage Heater

    Now zoom-out until you have one complete frame in view. Timebase 500us or 1ms.
  6. PaulS

    Teensy 4.0 / High Voltage Heater

    Can you turn the horizontal knob clockwise to zoom-in on one frame? Like I did in my screenshot above. Can you also set the trigger to "trailing edge"? [it's called "Slope Falling" in the Trigger Setup menu]. And set the "trigger level" to around 6V?
  7. PaulS

    Teensy 4.0 / High Voltage Heater

    I think the data is not correctly decoded on the scope. You should never see ID 0x3C with my latest code. Did you set the level in the Decode > Signal menu to around 6V?
  8. PaulS

    Teensy 4.0 / High Voltage Heater

    OK. Can you now zoom-in so that I can see the whole frame screen-wide? You have turn the time-base ["horizontal"] knob.
  9. PaulS

    Teensy 4.0 / High Voltage Heater

    Could you zoom-in on one of those bursts such that I can see the edges of the bits? I have a feeling that it is 9600 baud. Did you set the scope to 19200 baud when doing these measurements? Paul
  10. PaulS

    Teensy 4.0 / High Voltage Heater

    Great! Although I'm a bit concerned because of the CRC returned being 0. Well, let's see what the response actually returns. Modified the code to read out only ID 0x27. I left the lin.order() in just to be sure. But you could comment that out to see whether it makes a difference. #include...
  11. PaulS

    Teensy 4.0 / High Voltage Heater

    I read about LDF files but couldn't find them on the web. Conveniently, someone posted them! Need to study these 2 files. Found a very useful document a while ago. Paul
  12. PaulS

    Teensy 4.0 / High Voltage Heater

    Using 2 "for" loops, makes it happen: #include "lin_bus.h" // Create an IntervalTimer object IntervalTimer myTimer; int ledState = LOW; // ledState used to set the LED unsigned long interval = 200000; // interval at which to blinkLED to run every 0.2 seconds LIN lin; int...
  13. PaulS

    Teensy 4.0 / High Voltage Heater

    Yeah, that's really odd. The only differences are that the extended code creates an IntervalTimer object (that is not used anywhere) and drives the onboard LED. And on my desk the 'short' code works and shows the correct LIN bus activity? I'm lost. Paul
  14. PaulS

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    I don't think WS2812Serial is broken as the sketch in this thread still runs fine (just tried). But indeed FastLED_Cylon.ino does not run now. What version FastLED library are you using? Here I'm on version 3.6.0. The version that comes with Teensyduino 1.59 is 3.4.0. I suspect that WS2812Serial...
  15. PaulS

    Teensy 4.1 CAN Bus Communication

    Yes, you do. Did your code compile without errors? I just tried it and ran into compile errors. Reason is this line: serial.print(receivedMsg.buf);, that should be serial.print(receivedMsg.buf[i]);. BTW: if you want to share code, you can use the </> button on the top-left. Then it looks like...
  16. PaulS

    Teensy 4.0 / High Voltage Heater

    Those bottom 2 screens are strange, ID 0x16? ID 0x18? With respect to the scope: I used a time base of 2ms/div, and single-shot triggering on the trailing edge, trigger level around 6V. You are not using the probes with 10x attenuation? Paul
  17. PaulS

    Teensy 4.0 / High Voltage Heater

    Yep, no need for the Interval timer and blinking LED. Keep the working software as simple as possible. I would be seriously surprised when the circuitry will react before sending a Power ON request first. That's how I would design it if I was a Webasto engineer... Just leave the 4 lin.order()...
  18. PaulS

    Teensy 4.0 / High Voltage Heater

    Just checked my code on 9600 baud and 19200 baud: Identical as you can see. Did you set the scope to 19200 baud? Are you using exactly my code? I see from your IDE screenshot that void loop() starts at line 38. My code starts at line 18. So probably there is some more code in your void...
  19. PaulS

    Teensy 4.0 / High Voltage Heater

    Once we have determined that we do not see a valid CRC with all 19200/9600, 22/24, 21/35, lin1x/lin2x permutations, we can extend the code with writing and scanning all ID's. Let's take it step by step to avoid errors in the testcode. At least we found a bug the library. Paul
  20. PaulS

    Teensy 4.0 / High Voltage Heater

    Hi Jordan, It may be wise to stick to the basic code that I listed in message #77 intially. Once we see a sign of life [a valid CRC] there, we can go back to your code. Paul
  21. PaulS

    Teensy 4.0 / High Voltage Heater

    Excuse me, I meant to say "you may want to comment out line 463" like //_stream->read();. I corrected my other post as well. Paul
  22. PaulS

    Teensy 4.0 / High Voltage Heater

    Hi Jordan, you may want to uncomment line 463 in lin_bus.cpp [to be found here C:\Users\....\Documents\Arduino\Libraries\Teensy_3.x_4.x_and_LC_LIN_Master\src\] and compile & run the sketch again against the HVH. Paul
  23. PaulS

    LIN bus 2.1, working example?

    If I comment out //_stream->read();, the output on the serial monitor looks correct! So, _stream->read(); reads one byte? Paul
  24. PaulS

    LIN bus 2.1, working example?

    Thanks for looking into it. "A byte is thrown away at lines 462..465.". You are probably right, but I do not understand it? If I uncomment Serial.println(_stream->read(),HEX);, the serial monitor shows: That now printed byte 0x55 looks like the SYNC character. And the message data is shifted...
  25. PaulS

    LIN bus 2.1, working example?

    I may have found a bug in the CRC calculation and/or message data display in the LIN library. With the code from Teensy4_NCV7430-Get-Full-Status in message #19 above, the serial monitor shows this: However, my scope and logic analyzer show a different message and CRC: The serial monitor...
  26. PaulS

    Teensy 4.0 / High Voltage Heater

    Found out that my scope also has a LIN decoder onboard...nice! The scope can only list 7 frames at a time, but the 8th frame is also present. Paul
  27. PaulS

    Teensy 4.0 / High Voltage Heater

    Hi Jordan, Thought about a brute force method to see whether we can get any reaction from the HVH. The following code writes 4 times to the "write power" register, with different adresses and different LIN checksums. Then it tries to read from 4 times from the "read meas" register, again with...
  28. PaulS

    LIN bus 2.1, working example?

    Received my ordered hardware today. Both the LIN bus board and NCV7430 board work flawlessly with the Teensy LIN library. Noticable is that the NCV7430 part claims to be "LIN Physical Layer according to LIN 2.1/ SAE J2602", but you have to stick to the LIN 1.3 "Standard Checksum", not the LIN2.x...
  29. PaulS

    Teensy 4.1 and teensy strip controller

    Does it compile OK now? Paul
  30. PaulS

    Teensy 4.1 and teensy strip controller

    Yes, make sure that all 3 OctoWS2811Ext files are in the same directory as TeensyStripController.ino. Close and re-open that ino and the 3 files will be shown in tabs as shown in my screendump above. Paul
  31. PaulS

    Teensy 4.1 and teensy strip controller

    After unzipping, does the directory look like this? Paul
  32. PaulS

    Zephyr I2C RTOS on Teensy 4.1

    Didn't know Zephyr RTOS, but had a look at the website. Found that support for Teensy 4.x is actually present. And it looks like I2C is also supported: Hope that helps, Paul
  33. PaulS

    Teensy 4.1 and teensy strip controller

    Tried that so-called version 1.04 from Rappelbox but it throws the same amount of compile errors. But you need to have another 1.04 version: this one from "fat-fred". To download that version, don't use the link at the bottom of the page but click on the green <> Code button and "Download ZIP"...
  34. PaulS

    Teensy 4.0 / High Voltage Heater

    Thanks for the photo's and the whole PDF. That may well be the only way to get out of this impasse but it's a LOT of reverse engineering stuff to do. And your units may even react differently... I checked EBAY for a HVH50 unit in Europe but 460 euro's is too much for only satisfying my...
  35. PaulS

    Teensy 4.0 featured at WatchWesWork video

    YouTube, @ 6m20s
  36. PaulS

    Teensy 4.1 and teensy strip controller

    A Teensy 4.0 uses the same microcontroller as a Teensy 4.1, so from a code perspective that shouldn't matter. What does matter is that in the library I see a lot of registers being used that are specifically for a Teensy 3.1/3.2. I just tried to compile the example and it fails big time: You...
  37. PaulS

    Teensy 4.0 / High Voltage Heater

    If I read your last code correctly, you never issued a lin.order(21, linTXdata, 4, lin2x); to turn the HVH on. You need to use uint8_t linTXdata[4] = { uint8_t(Power / 40), uint8_t(Temperature + 40), 0, 8 }; as well to make that work. Hmm, I feel we have to work with a lot of uncertainties...
  38. PaulS

    Teensy 4.0 / High Voltage Heater

    I believe so. If I understand the library correctly, it returns -1 when the CRC is not correct. See this line. Forum member @Markus_L811 is the author of the library. Perhaps he can confirm. Paul
  39. PaulS

    Teensy 4.0 / High Voltage Heater

    Difficult to tell, the only info we have on those 3 bytes, is what is stated in the table. Paul
  40. PaulS

    Teensy 4.0 / High Voltage Heater

    That is definitely not correct. ID23 is a read status register, not a write register. So no reason to write to that status register. Perhaps a typo from his side. Paul
  41. PaulS

    Teensy 4.0 / High Voltage Heater

    Correct. I don't think the HVH is reacting. I got a similar random return but without an HVH attached... Paul
  42. PaulS

    Teensy 4.0 / High Voltage Heater

    If your unit is a 9600 baud version, then the code will look like this: #include "lin_bus.h" uint16_t Power = 175; // set to required power uint8_t Temperature = 45; // set to required temperature LIN lin; int lin_cs = 32; uint8_t linTXdata[4] = { uint8_t(Power / 40)...
  43. PaulS

    LIN bus 2.1, working example?

    Yes,I found it on Github; this commit explains it all. Thanks, Paul
  44. PaulS

    Teensy 4.0 / High Voltage Heater

    Hi Jordan, knowing what we learned in the other thread, here is a basic sketch that you could try with your HVH. No fancy plotting yet, just raw data to the serial monitor: #include "lin_bus.h" uint16_t Power = 175; // set to required power uint8_t Temperature = 45; // set to required...
  45. PaulS

    Teensy 4.0 / High Voltage Heater

    OK, continuing here: OK, I think I understand. In your intial sketch, the software tries to read from the HVH using lin.response() and if it does not react (yet) sends a power-on message using lin.order(). And repeats this. I'll come up with a basic sketch later tonight for you to try with...
  46. PaulS

    LIN bus 2.1, working example?

    Allright, needed some time to digest all of this. @skpang : do I understand correctly that the library has changed such that LIN lin(&Serial3, 19200); needs to be replaced by LIN lin; and lin.begin(&Serial3, 19200); needs to be added to setup()? I don't understand this but if that is the way...
  47. PaulS

    SPI communication between Teensy 4.1 and arduino nano HELP!!!

    Which SPI libraries did you use on the Nano and Teensy 4.1 respectively? You may want to share your Nano code and Teensy code for others to have a look at. Paul
  48. PaulS

    LIN bus 2.1, working example?

    Hi Jordan, Does the unaltered "demo" sketch work as well? [ofcourse you need to change this LIN lin(&Serial3, 19200); and this int lin_cs = 32;]. I would like to stick to the original examples as close as possible. For example, keep the line LIN lin(&Serial3, 19200); where it is and don't use...
  49. PaulS

    LIN bus 2.1, working example?

    Good to hear that your boards are working. Looking forward to your actual heater results! Paul
  50. PaulS

    Potential Issue with OVERCLOCK_MAX_VOLT in clockspeed.c for Teensy 4.0

    Well, the latest datasheet (couldn't find a newer one than the one you referred to) states 1.6V: So, strictly spoken clockspeed.c is correct. However, for overdrive operation it's 1.3v: So perhaps the voltage calculation should be modified? // compute required voltage uint32_t...
Back
Top