PaulS
Reaction score
28

Latest activity Postings About

    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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...
      • 1708355760608.png
      • 1708355808762.png
      • 1708355586263.png
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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 Serial Plotter / IDE / Teensy 4.0.
      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
    • PaulS
      PaulS replied to the thread 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...
      • 1708157146223.png
    • PaulS
      PaulS replied to the thread LIN bus 2.1, working example?.
      Good to hear that your boards are working. Looking forward to your actual heater results! Paul
    • PaulS
      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...
      • 1708031535694.png
      • 1708031824255.png
    • PaulS
      PaulS replied to the thread pin 12 dead?.
      int digitalPins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41}; pinMode(digitalPins[10], OUTPUT); digitalWrite(digitalPins[10]...
    • PaulS
      PaulS replied to the thread LIN bus 2.1, working example?.
      Ordered a LIN bus board and RGB board yesterday as well from SK Pang. Hope that they arrive end of this week. Then I will look into the LIN stuff again. Paul
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Different readings here (without anything attached ofcourse): Have to think about this... But not tonight I'm afraid - other obligations. Paul
      • 1707679105146.png
    • PaulS
      PaulS reacted to skpang's post in the thread LIN bus 2.1, working example? with Like Like.
      I have a RGB LED LIN-bus example working with the Teensy 4.0 and Markus's LIN library. https://github.com/skpang/Teensy40_CAN_FD_LIN-bus_NCV7430_RGB_demo Looks like jsimonkeller is making progress, lets see if he needs anymore help.
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Well, instead of Serial.println(lin.response(22, data, 8, lin2x), HEX);, we better use: lin.response(22, data, 8, lin2x); for (int i = 0; i < 8; i++) { Serial.println(data[i], HEX); } Paul
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Allright, learned something today. So lin2x solved the communication troubles? Well, great then! Paul
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Good morning, have a number of questions: 1. are you sure that the Webasto unit at hand is fully functional? 2. do you perhaps have an oscilloscope available so that you can measure on the actual LIN bus? 3. can it be that LINbus library has an...
    • PaulS
      Forum member @jsimonkeller and I are struggling to get a LIN bus 2.1 device to work, see this thread. We both do not have experience with this library and also do not know whether LIN bus V2.1 frames are actually working. So I hope someone with...
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Weird, adding a timer that stops disconnecting... 0xFFFFFFFF means that it is reading HIGH's only. HIGH is the default state of the DATA line. And 0xFFFFFFFF is only 4 bytes - you would expect lin.response(22, data, 8, lin2x to read 8 bytes...
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      I'm wondering why we actually need the lin.order(24, 0, 0, lin2x);? ID24 is a read-register, so why do we need to write "0,0"? Perhaps comment out lin.order(24, 0, 0, lin2x);? in your code? Paul
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Yeah, that's a good sign. Perhaps there should be some time between lin.order() and lin.response()? I also saw that you reverted back to 9600bps? Paul
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Pin1 (RXD) reading HIGH is normal. Only during a LIN message (~5ms) it can go LOW. See LA screenshot. But pin 2 of the MCP2004 should definitely be HIGH. pinMode(lin_cs, OUTPUT); digitalWrite(lin_cs, HIGH); drive Teensy pin 32 HIGH. By the way...
    • PaulS
      PaulS replied to the thread Serial Plotter / IDE / Teensy 4.0.
      Yes, you should. The LA is only reading the data on the TX3 line. If a had an actual LIN device, I probably would have seen the response data as well. Paul
  • Loading…
  • Loading…
Back
Top