Forum Rule: Always post complete source code & details to reproduce any issue!
Page 134 of 134 FirstFirst ... 34 84 124 132 133 134
Results 3,326 to 3,341 of 3341

Thread: Teensy 4.0 First Beta Test

  1. #3326
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,694
    Fixed PWM pins for SDCards: https://github.com/PaulStoffregen/cores/pull/381

    Tested with:
    Code:
    void setup() {
      pinMode(13, OUTPUT);
    
      analogWriteFrequency(34, 100);
      analogWriteFrequency(35, 100);
      analogWriteFrequency(36, 100);
      analogWriteFrequency(37, 100);
      analogWriteFrequency(38, 100);
      analogWriteFrequency(39, 100);
      analogWrite(34, 40);
      analogWrite(35, 80);
      analogWrite(36, 120);
      analogWrite(37, 160);
      analogWrite(38, 200);
      analogWrite(39, 240);
    }
    
    void loop() {
      digitalWrite(13, !digitalRead(13));
      delay(500);
    }
    Verified with:
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	20 
Size:	41.2 KB 
ID:	16790

  2. #3327
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,335
    Quote Originally Posted by KurtE View Post
    Fixed PWM pins for SDCards: https://github.com/PaulStoffregen/cores/pull/381

    Tested with:
    Code:
    void setup() {
      pinMode(13, OUTPUT);
    
      analogWriteFrequency(34, 100);
      analogWriteFrequency(35, 100);
      analogWriteFrequency(36, 100);
      analogWriteFrequency(37, 100);
      analogWriteFrequency(38, 100);
      analogWriteFrequency(39, 100);
      analogWrite(34, 40);
      analogWrite(35, 80);
      analogWrite(36, 120);
      analogWrite(37, 160);
      analogWrite(38, 200);
      analogWrite(39, 240);
    }
    
    void loop() {
      digitalWrite(13, !digitalRead(13));
      delay(500);
    }
    Verified with:
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	20 
Size:	41.2 KB 
ID:	16790
    Nice work Kurt. Never even realized those SD pins were PWM capable. Always focused just on the SD Card aspect of them. Those draft cards Paul posted are coming in handy. You guys make it look so easy at times. Distractions are keeping me real busy, not enough time with the T4. Been playing with the HDMI adapter. Works nice but there are differences in the draw commands, some are almost identical others are a bit different. Just kind of playing with it a few minutes here and there. Have a board setup to permanently setup a T3.6 as a Logic analyzer if I can ever get to that as well.

    BOUNCE LIB
    Played around with this and seems like it is working on pins 0, 1. Problem is I am not really getting double readings that I can see. Have to get a little more into the weeds I guess.

  3. #3328
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,694
    @mjs513 - Thanks, I knew they were, as they show up in my excel document:
    Code:
    34	SD_B0_03	2.15	Serial5(8) RTS		SPI2(1) MISO	PWM1_B1			IO-07			DATA1
    35	SD_B0_02	3.14	Serial5(8) CTS		SPI2(1) MOSI	PWM1_A1			IO-06			DATA0
    36	SD_B0_01	3.13		Wire1(3) SDA	SPI2(1) CS0	PWM1_B0			IO-05			CLK
    37	SD_B0_00	3.12		Wire1(3) SCL	SPI2(1) SCK	PWM1_A0			IO-04			CMD
    38	SD_B0_05	3.17	Serial5(8) RX		SPI2(1) B_DQS	PWM1_B2			IO-09			DATA3
    39	SD_B0_04	3.16	Serial5(8) TX		SPI2(1) B_SSO_B	PWM1_A2			IO-08			DATA2
    Just forgot to take a look at pwm to see if someone else had put them in or not... (NOT)

    Luckily easy to create test case, as it helped me to verify that I updated table correctly (I had one mistype...)

    Now back to some other distractions (like clean up yard...)

  4. #3329
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,556
    Good work @KurtE with the pin checks ALT and bonus PWM's ... Though Paul's cyclic trigger routing for the SD pins was really tricky testing the POGO.

    Distracted like @mjs513 here - pulled apart a lightly used 8-10 year old laptop drive and 120 GB formatted and running with T4 Updated USBHost from @KurtE Bluetooth branch and then the old drive hits 13 MB/Sec same as others when bumping buffer to 64 KBytes.

    My Big Brother just got a second HP from Costco with a factory Bad HDD that failed during Win 10 update to latest ... hours of slowness - one got farther then factory diagnostics pointed to HDD fail on the second. Spent a couple hours on the phone with him during that ...

  5. #3330
    @all

    Wondering if the RA8875 library has been tried yet.
    Could not find anything about it in the T4 thread.

    I pulled out my Adafruit RA8875 driver board with 7" touch screen to test with the T4 today. Using Sumotoy's RA8875 library I was able to run most all of the example sketches
    The touch screen calibration sketch locks up at the 'ok, Now Touch Bottom/Right angle!' prompt. I fixed it before but can't remember what I did or how I did it.

    Only had to add defines for the T4 to any of these defines in 'RA8875.cpp', 'RA8875.h' and 'RA8875UserSettings.h'.

    From:
    Code:
    #if defined(__MK20DX128__) || defined(__MK20DX256__)//Teensy 3.0 , 3.1
    To:
    Code:
    #if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)//Teensy 3.0 , 3.1
    In the sketches I only had to change this:
    Code:
      tft.begin(RA8875_800x480);
    To this:
    Code:
      tft.begin(Adafruit_800x480);
    Adafruit RA8875 looks like it will need alot of work to get it to work with the T4 unless somebody else has already done it.

  6. #3331
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,694
    Interesting question is how best to handle libraries like these. Sumo toy has not logged in for something like 2 years. Also has not updated many of these for several more...

    Edit: And if by chance sumotoy(Max) is reading this. Hope you are doing OK.
    Last edited by KurtE; 06-15-2019 at 11:23 PM.

  7. #3332
    @kurte

    The last time I saw anything from him on GitHub was this https://github.com/sumotoy/RA8876.
    I also hope he is doing well.

    I updated his RA8875 driver to use it as a terminal emulator with T36 and a structured BASIC. His code was very fast. But I needed a bigger display.
    Eyes are not what they used to be
    That is why I was hoping to see his RA8876 driver. So I went to the RA8876_Lite driver from RAiO and modified it. I want to port it to the T4.
    It should not be that hard as it is working well with T36.

  8. #3333
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,694
    @defragster - Thanks, with PWM it is pretty easy as the tables were already there, just needed to add 6 new items at the end. Most of the information for these table entries are in my excel document.

    and @others, The one part that I don't have there is the IO pin MUX values for the different modes (that is what Mux value in this case turns the pin into using PWM mode)

    Maybe at some point will add that data... Plus while not in this case sometimes a more confusing thing is that for Input like functions, there may also be an INPUT_SELECT mux value that you need to set if that same Input function can be done on multiple pins.

    One thing sort of confusing to me about these input select mux registers. Is for example the Serial TX pins have these as well, example: IOMUXC_LPUART8_TX_SELECT_INPUT
    I filled that one in to my Hardware Serial code for Serial5, but did not look up the ones for the other Serial ports yet as so far the code does not need it. If I were a guessing person, I would guess that this is mainly (only?) used if you switch the Serial port into Half duplex mode. Which so far our standard HardwareSerial class does not do...

    I wish we did allow something like: Serial1.begin(1000000, SERIAL_8N1 | SERIAL_HALF_DUPLEX);
    Where the begin mode would do the setup for half duplex, and the Serial.write() code would do like it does for transmitterEnable(); And set the pin into TX mode and when the tx queue is empty and ... sets the pin back into RX mode...

    @defragster Sounds like you have been busy with lots of non T4 stuff Me too.. Spent most of yesterday outside on deck trying out green egg...

    On the USBHost mass storage stuff, Hopefully at some point soon we will have the Bluetooth branch brought into the main release branch of USBHost_t36 so the hang on using buffers of exact duplicates of max will not hang. Or could create another quick patch to just have that. Also at some point would be interesting to see if some of this mass storage support could be somehow brought into builds and/or some other way to make it easier for others to find, as it great functionality to have!

    Now back to playing (maybe even some on T4)

  9. #3334
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,694
    Quote Originally Posted by wwatson View Post
    @all

    Wondering if the RA8875 library has been tried yet.
    Could not find anything about it in the T4 thread.

    ...
    Adafruit RA8875 looks like it will need alot of work to get it to work with the T4 unless somebody else has already done it.
    Which version are you trying out? The version installed by Teensyduino? Which appears to match Paul's version: https://github.com/PaulStoffregen/Adafruit_RA8875

    Which github says is something like 55 commits behind the Adafruit master version.

    Or the version you can install from library manager (Version 1.3.1). Which probably matches what they have on github

  10. #3335
    @Kurte

    I am using the version installed in Teensyduino. I will get latest version from GitHub and test it.
    Will probably get the latest 'Adafruit_GFX' from GitHub as well.

    Thanks Kurte

  11. #3336
    @Kurte

    Downloaded the latest versions of 'Adafruit_RA8875' and 'Adafruit_GFX'.

    I went through all of the example sketches. Just had to change pin assignments for SD cs, Reset and INT pins.
    I compiles clean and all sketches work as expected including touch screen and touch screen calibration.

    The touch screen sketch has the ability to store calibration values to eeprom. I want to check that out on the T4.
    The 'ra8875_bitmap_fast.ino' sketch loads a picture of a parrot to the screen and measures the load time.
    Going to use MSC to see how fast it loads from an HDD and Flash drive.

    Thanks again for the help Kurte.

  12. #3337
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,335
    T4 HDMI Shield Test

    @KurtE, @wwatson, @all

    Finally finished a graphics test sketch similar to that used for the ILI9341/9488. Did find a couple of drawbacks that I have to figure out though.
    1. There really isn't a screen rotation
    2. Text rotation is 90 degrees only - this one I am not sure about.
    3. There is no newline command in the existing library so I created one from info using the xlatb 8876 driver. Here are some numbers but really shouldn't compare to the TFT displays. The 8876 does h/w acceleration:
    Code:
    Running ra8876_Lite::begin(args)...
    RA8876 connect pass!
    Ra8876_Lite::ra8876PllInitial(pclk)...
    PLL initialization successful
    Name of LCD: CEA 1280x720p@60Hz 16:9 VIC#4
    LCD width: 1280
    LCD height: 720
    H blanking: 370
    H front porch: 110
    H pulse width: 40
    V blanking: 30
    V front porch: 5
    V pulse width: 5
    Pclk Polarity: 0
    Vsync Polarity: 1
    Hsync Polarity: 1
    DE Polarity: 0
    CH703X start running from here...
    Benchmark                Time (microseconds)
    testText              17947
    Rectangles (outline)     12973
    Rectangles (filled)      411121
    Circles (filled)         95637
    Circles (outline)        80590
    Triangles (outline)      8742
    Triangles (filled)       133401
    Rounded rects (outline)  14356
    Rounded rects (filled)   442527
    Ellipse   8810
    Ellipse Fill  416475
    Gradient test took 53 ms
    Done!

  13. #3338
    @mjs513

    Not sure if you have the RA8876 RM. If not then here is the link:
    https://www.buydisplay.com/download/ic/RA8876.pdf

    On page 52, section 11.4 it describes rotation and mirroring. It says that it can rotate counter clockwise by 90 or 180 degrees and mirroring is the same as 360 degrees vertically or horizontally.
    I THINK!! Anyway it can be accomplished.
    What is the SPI speed you are using? According to the RM you should be able to run at 50MHz. I have never been able to go above 28MHz. I think it's because of the ribbon cable length I am using and the length of the leads to the ribbon cable. Probably 8" to 9" from the T36.
    Nice to see it working.
    When I can afford it, I want one

  14. #3339
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,335
    Quote Originally Posted by wwatson View Post
    @mjs513

    Not sure if you have the RA8876 RM. If not then here is the link:
    https://www.buydisplay.com/download/ic/RA8876.pdf

    On page 52, section 11.4 it describes rotation and mirroring. It says that it can rotate counter clockwise by 90 or 180 degrees and mirroring is the same as 360 degrees vertically or horizontally.
    I THINK!! Anyway it can be accomplished.
    What is the SPI speed you are using? According to the RM you should be able to run at 50MHz. I have never been able to go above 28MHz. I think it's because of the ribbon cable length I am using and the length of the leads to the ribbon cable. Probably 8" to 9" from the T36.
    Nice to see it working.
    When I can afford it, I want one
    Thanks for the link. I do have a copy but I was interpreting that as applicable to only images not text. Probably wrong - have to look again.

    Running SPI at default for Teensy in the lib - 50Mhz. Could be with ribbon. Had some problems with cable lengths running at SPI high speeds.

  15. #3340

    What's Going on with sumotoy and his Libraries?

    Quote Originally Posted by wwatson View Post
    @kurte

    The last time I saw anything from him on GitHub was this https://github.com/sumotoy/RA8876.
    I also hope he is doing well.

    I updated his RA8875 driver to use it as a terminal emulator with T36 and a structured BASIC. His code was very fast. But I needed a bigger display.
    Eyes are not what they used to be
    That is why I was hoping to see his RA8876 driver. So I went to the RA8876_Lite driver from RAiO and modified it. I want to port it to the T4.
    It should not be that hard as it is working well with T36.
    Saw this note in one of sumotoy's github repositories:
    I'm not disappeared...
    Last year, around August I got disease, in the same year, around november a loved member of my family was in Hospital and in less than a month left us, this caused a coincidence of problems over problems so my spare time dissolved.
    That's life, there's things over your control and nothing I can do, I accepted but have to stop some activities.
    I will go back here? Sure, I already started, but slowly... I got disease as well so I cannot spend too much time.
    I've enjoy a lot helping community to build something amazing, I got several projects videos and pictures from people that used my libraries and I'm always happy to see those things but in the same time got lot of bad letters from people that pretend this and that, fix this... Everyone need a break during life, last year was my turn and I'm happy to still be here to say this... Please understand.

  16. #3341
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,556
    @mjs513 - the HDMI demo on uTube showed menu and screen rotation - it seemed that was text over image. I don't have one and haven't looked beyond that.

    @willie.f.t - yeah I remember that post and kept hoping to see a return to health note if not the forum for more code. @sumotoy did some good work on the TFT's I had and played with while he was active.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •