PaulS
Reaction score
28

Latest activity Postings About

    • PaulS
      [RESOLVED] So, it turns out that I was attempting to call the begin() function on each of the MIDIDevice_BigBuffer devices. This is actually incorrect. Rather, the begin() function should only be called on the single USBhost device. Here's a...
    • PaulS
      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
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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.
    • PaulS
      PaulS replied to the thread Teensy 4.0 / High Voltage Heater.
      Now zoom-out until you have one complete frame in view. Timebase 500us or 1ms.
    • PaulS
      PaulS replied to the thread 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?
    • PaulS
      PaulS replied to the thread 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?
      • SDS00008.png
    • PaulS
      PaulS replied to the thread 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.
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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...
      • 1708846804264.png
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      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...
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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...
      • SDS00005.png
      • SDS00006.png
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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...
      • 1708604573953.png
      • SDS00003.png
      • DSView-240222-131010.png
    • PaulS
      PaulS replied to the thread 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
      • SDS00002.png
    • PaulS
      PaulS replied to the thread 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...
      • SDS00092.png
    • PaulS
      Short update: Improved visual quality and overall look and feel. The little bar graph under the Shuffle button indicates the progress of the transition between parameter sets. Now, a Full Auto mode is present, too, meaning to periodically...
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      Yes, and it looks like it's going to work now, it has an orange light flashing which I never got before and it and it shows up in my device manager now too. Thanks again Paul
    • PaulS
      Does it compile OK now? Paul
    • PaulS
      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
    • PaulS
      After unzipping, does the directory look like this? Paul
      • 1708367021979.png
    • PaulS
      PaulS replied to the thread 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
      • 1708356638766.png
    • PaulS
      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...
      • 1708355586263.png
      • 1708355760608.png
      • 1708355808762.png
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      YouTube, @ 6m20s
    • PaulS
      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...
      • 1708280636711.png
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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
      • 1708207528062.png
    • PaulS
      PaulS replied to the thread 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
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread LIN bus 2.1, working example?.
      Yes,I found it on Github; this commit explains it all. Thanks, Paul
    • PaulS
      PaulS replied to the thread 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...
      • DSView-240217-205832.png
    • PaulS
      PaulS replied to the thread 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...
    • PaulS
      PaulS replied to the thread 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()...
      • DSView-240217-201553.png
    • PaulS
      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
  • Loading…
  • Loading…
Back
Top