Search results

  1. D

    led-cube 15x

    A simple animation is to pick one of the eight corners and draw a wire-frame cube at the corner, starting with a line of length one, then two, then three, and so on until the entire 15x15x15 cube is outlined. Start reducing the line length back down to a single point, then choose another corner.
  2. D

    led-cube 15x

    I've attached a zip file of the perl code and the perl code output. For the 8x8x8 cube I'm only storing one bit per LED in flash. A random color is selected before the animation starts and every point has the same color. The rain/fireworks/worms code (not included) uses varying colors.
  3. D

    led-cube 15x

    Years ago I built an 8x8x8 cube using an arduino uno (ATmega328 processor). I display several animations, sixteen frames each pre-calculated and stored in flash. I have the "Sombrero Function", a wave, a spiral, and a rotating caltrop/jack. In addition I have dynamic animations of rain...
  4. D

    Adding Bluetooth and WiFi to a Teensy 4.1

    A few years ago I built a clock around an ESP32. I wanted WiFi to get the time using NTP and Bluetooth to change clock parameters. I discovered that the ESP32 could only do one or the other, not both simultaneously. Since I only needed WiFi for NTP I decided to primarily use Bluetooth. When...
  5. D

    Timelib.h and Daylight saving Time

    I use this library: Timezone
  6. D

    Beware! T4x RTC power consumption

    I power the RTC using a super capacitor, like this one: 1.5F 3.5v cap. I use a schottky diode between the Teensy's 3.3v output and the RTC power input to charge the cap. With a Teensy 3.2 it powers the RTC for several days. I haven't experimented with a Teensy 4.1, but I expect it to last a...
  7. D

    T4 NVRAM (SNVS_LPGPR0..3) and the penalty of using it?

    I've used an external F-RAM chip on a Teensy 3.6 like MatrixRat suggested in Post #13. If you're using a Teensy 4.1 you should be able to use a QSPI F-RAM chip as noted here...
  8. D

    Teensy 3.6 looses programming

    In my case it is known working code that goes missing. I have no problem uploading and running the code. In one case it's an MP3 player that is turned on a few times a week. The most recent case is a clock that's been running for several years. See...
  9. D

    Teensy 3.6 looses programming

    I just had a 2nd T3.6 lose it's programming. After a power "flicker" the T3.6 appeared dead. The PC didn't even see the T3.6 over the USB connection. After holding the reset button down for 15 seconds the PC could see the T3.6 and I could reprogram it. The power supply for this T3.6 is a...
  10. D

    DACs Teensy 3.5

    Looks to me like there is only one analog write in the for loop, with the second analog write after the for loop. Try this code: // Test DACs sine wave on Teensy 3.5 const int sine_dataA[192] =...
  11. D

    Teensy 3.6 looses programming

    The code is only reading from EEPROM, it's not saving any data there. I do use Serial to read commands and update the EEPROM, but I'd have to have the USB connected for that and it is only rarely connected. Even then the code only writes to EEPROM if the data from Serial is properly formatted...
  12. D

    Teensy 3.6 looses programming

    Under what circumstances would a Teensy 3.6 loose its programming? Several times I've had a Teensy 3.6 appear to die but really it just needed re-programming. I have to hold down the reset button for 15 seconds and then the Teensy 3.6 comes back to life. The teensy 3.6 is in an MP3 player...
  13. D

    Teensy 4.1 - NTP/PTP/RTC

    Here's the problem: const long SECS_PER_TICK32 = pow(10, 12) / pow(2, 32); const long SECS_PER_TICK15 = pow(10, 12) / pow(2, 15); ... ntp_fracPicos = fracSecs * SECS_PER_TICK32; ... int rtc_fracMicros = time_fracs * SECS_PER_TICK15; "const long" creates 32-bit constants...
  14. D

    Teensy 4.1 - NTP/PTP/RTC

    The NTP packet does not include fractional time in nanoseconds. The 32-bit field for fractional time is in the full 32-bits. It counts from 0 - 4294967295, or about 233 picoseconds per tick. Dividing the fractional seconds by a billion as in "Trx=epoch+(fracSecs/1E9);" does not give you the...
  15. D

    Teensy 4.1 - NTP/PTP/RTC

    NTPv3 and below use 32-bit seconds and 32-bit fractional seconds. NTPv4 use 64-bit seconds and 64-bit fractional seconds. The Teensy 4 RTC has a 64-bit counter incremented 32768 times a second. If you take the seconds component of an NTP packet and convert it to seconds since 1970, that...
  16. D

    Teensy 4.1 - NTP/PTP/RTC

    The SNVS_HPRTCMR and SNVS_HPRTCLR registers together form a 64-bit counter incrementing 32768 times a second, asynchronously from the CPU clock. The lower 15 bits are returned in the readRTCfrac() call, which will range from 0 - 32767. This represents a fraction of a second, where 32768 would...
  17. D

    Teensy 4.1 - NTP/PTP/RTC

    Try this for your loop() void loop() { delay(1000); uint64_t tmi = rtc_get_64(); // Convert the time value to seconds uint64_t time_seconds = tmi >> 15; uint64_t time_microseconds = ((tmi & 0x7fff) * 1000000ULL) >> 15; Serial.println("----------------------------")...
  18. D

    Teensy 4.1 - NTP/PTP/RTC

    I suggest you read through https://forum.pjrc.com/threads/61665-RTC-Registers-and-Millisecond-Precision-from-Teensy-4-0 Turns out the SNVS_HPRTCMR and SNVS_HPRTCLR together form a 64-bit counter incrementing 32768 times a second. In the following code: #include "imxrt.h" unsigned long...
  19. D

    Teensy 4.1 - NTP/PTP/RTC

    The code I submitted works for either Teensy 4 or Teensy 3, controlled by a "#define TEENSY4" if you want Teensy 4. Here's the readRTCFrac() code for only Teensy 4: #include <imxrt.h> /******************************************************************************/ // Read the RTC fractional...
  20. D

    Teensy 4.1 - NTP/PTP/RTC

    Paul posted this code: extern "C" int _gettimeofday(struct timeval *tv, void *ignore) { uint32_t hi1 = SNVS_HPRTCMR; uint32_t lo1 = SNVS_HPRTCLR; while (1) { uint32_t hi2 = SNVS_HPRTCMR; // ref manual 20.3.3.1.3 page 1231 uint32_t lo2 = SNVS_HPRTCLR; if (lo1 == lo2 && hi1 ==...
  21. D

    TEENSY 4.1 RTC battery

    I've had success using a 0.5F capacitor tied to VBAT. I charge the capacitor using a schottky diode tied to the Teensy's 3.3v pin. The capacitor keeps the RTC running for over a day without power. I've not tried a coin cell.
  22. D

    Booster for Fastled

    If the 3.3v signals are reliable to the first LED, then using the first LED as a level shifter should work. I've used a TXB0104 level-shifter chip with APA102 LEDs without any problem. If you don't want to handle SMD chips a break-out board is available such as...
  23. D

    5 LCDs on one SPI bus with the library ST7789_t3.h on Teensy 3.5

    Since you're using a common Reset PIN (TFT_RST), all LCD displays get reset several times, once per tftX.init() call. I'm driving six LCD displays with a Teensy 4.1 from a common SPI without difficulty. In my case I pass "0xff" as the TFT_RST on the instantiation, then execute my own reset...
  24. D

    Reading data from Here 2 GNSS module with Teensy 4.1 using serial communication

    The GNSS modules I've used modify their NMEA string prefixes for each GNSS type. I've seen "GP", "GN", and "GL", as in "GPRMC", "GNMRC", "GLRMC", and "GPGSV", "GNGSV", "GLGSV". I think Galileo would be a "GA" prefix and BeiDou would be "PQ", but that could depend on your GNSS module's firmware.
  25. D

    Uncanny Eyes is getting expensive

    Here's a quick photo of my Literary Clock with the eyes running. It shows up randomly on the clock during Halloween.
  26. D

    Accuracy and Temperature Variation of micros() and millis() Function

    When I use a Teensy 3.2 I solder in a 5ppm 32khz crystal (citizen CFS-20632768HZFB) and use a 1F super cap tied to the RTC battery input. The super cap is charged via a schottky diode tied to 3.3v. I've found it keeps the RTC running for several days without power. I sync the on-board RTC...
  27. D

    UART interrupt for teensy 3.5

    Have you looked through https://www.pjrc.com/teensy/td_uart.html? The non-blocking functions Serial1.availableForWrite() and Serial1.available() might help. The setup functions Serial1.addMemoryForRead(buffer, size), Serial1.addMemoryForWrite(buffer, size), Serial1.attachRts(pin), and...
  28. D

    USB pads on Teensy 3.2 not working?

    Did you cut the trace between VUSB and Vin? With the trace cut the 5v from the USB port won't make it to the teensy.
  29. D

    Voltage ramp on teensy 4.0 pins too slow for my application

    As rcarr mentioned in post #5, connect Vcc from all the DRV8837 chips to the +3.3v out on the Teensy.
  30. D

    Uncanny Eyes is getting expensive

    The M4-specific code is much more complex than the original. The blank-scanline optimization helps during eye blinks. The optimization is already partially present in the M4 version, handling the upper eyelid. I'll look at adding additional code for the lower eyelid and for the case of eyelid...
  31. D

    Uncanny Eyes is getting expensive

    Have you tried the "skip blank scanline" optimization? I'm curious what speed up you see.
  32. D

    Uncanny Eyes is getting expensive

    My project is a Literary Clock, see https://www.youtube.com/watch?v=YcSkkDHdfg0 On Halloween there is a one-in-ten chance that the uncanny eyes code is activated. The text is drawn first, then a few seconds later a skull is drawn in the center of the display and two eyes are animated for the...
  33. D

    Uncanny Eyes is getting expensive

    I run a pair of Uncanny Eyes on a 10" LCD (ER-TFTM10-1) with an RA8876 controller using a Teensy 3.6. I'm getting about 50 frames a second for both 128x128 eyes by only outputting rows that have data. When building a eye's row I mark a boolean true if a pixel is non-zero. When sending out the...
  34. D

    3.x Availability vs. 4.x and Power Consumption

    I have two clock projects using a Teensy 4.1, and both switch clock speed between 72 MHz and 600 MHz. The first updates six separate LCD displays as shown here: https://youtu.be/qk0BrwT1yQQ The Teensy runs at 72 MHz until it has to update a display, then it switches to 600 MHz until the display...
  35. D

    Problem with ER-TFTM101-1

    The library is checking if the display has completed drawing a primitive (rectangle, circle, line, etc). It checks a status register 50,000 times delaying a microsecond between checks. If the status register doesn't read back as zero after 50,000 checks it prints the "2D ready failed" message...
  36. D

    Problem with ER-TFTM101-1

    First change your wiring so the display's pin 8 is connected to the teensy's pin 14. The library you're using allows you to specify the SCK pin on the constructor. RA8876_t3::RA8876_t3(const uint8_t CSp, const uint8_t RSTp, const uint8_t mosi_pin, const uint8_t sclk_pin, const uint8_t...
  37. D

    Problem with ER-TFTM101-1

    I used this display a few years ago with a teensy 3.6. My notes say "move the SPI clock to pin 14 instead of pin 13, as the resistor & LED on pin 13 will mess with the signal". I'm using SPI.setSCK(14).
  38. D

    Powering RGB Rotary Encoders with Teensy

    Adafruit sells a PWM module designed for LEDs instead of Servos. It controls 24 LEDs and is currently in stock. https://www.adafruit.com/product/1429 I've used them to drive grain-of-wheat light bulbs that are inside of a seven-segment style display.
  39. D

    [posted] RCA 118 "tombstone" MP3 player

    I re-compiled the code using Teensyduino 1.54 and it works great! I have a 64 GB SD card installed now. I've added an FRAM chip (FM25V20A-PG) to use for shuffle-play. I'm storing 32-bit hashes of the directory (like "A/95" meaning band "A", 950 on the tuning dial) and of the fully-qualified...
  40. D

    RGB LED Project (sending data to RGB strips)

    On the line "FastLED.addLeds<WS2812B, 1, GRB>(leds, 10);" the "1" refers to the pin number. You'll have better luck with "FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, 10);"
  41. D

    RA8876LiteTeensy For Teensy T36 and T40

    I ported "uncanny eyes" over to the RA8876 library. I'm running two eyes on a 10" screen with a Teensy 3.6. I tried the 128x128 version of the eyes and got about 50 frames a second. I had some artifacts at the bottom of each eye, so added "#undef SPI_HAS_TRANSFER_ASYNC" right after including...
  42. D

    USB 2.0 virtual Com

    A friend sent me this note: Objective: To get data out of the Arduino Teensy 3.6 faster than its default USB 1.0 port can support, but to stay within the USB standard. Problem: The Teensy 3.6 development board (https://www.pjrc.com/store/teensy36.html) has a built-in physical micro USB port...
  43. D

    RA8876LiteTeensy For Teensy T36 and T40

    I'm including the RA8876 code I'm using for the literary clock. I use the touch screen on the clock to set options, like brightness, daylight savings time, and font (new times roman or arial).
  44. D

    RA8876LiteTeensy For Teensy T36 and T40

    About a year ago I built a project around a ER-TFTM101-1 purchased from buydisplay.com. I included a capacitive touch-screen and the GT30L32S4W (aka ER3304-1) font ROM. I hacked up the RA8876 driver, keeping only what I needed. I'm including some photos of the project, a "Literary clock" like...
  45. D

    Teensy 3.6 lost programming

    I've been using a Teensy 3.6 in my "radio" (see https://forum.pjrc.com/threads/55551-posted-RCA-118-quot-tombstone-quot-MP3-player ) almost daily for over a year. Earlier this week it wouldn't turn on. I checked the power supply and 5v is properly fed to the Teensy. I measure 3.3v from the...
  46. D

    Future Teensy features & pinout

    I've done several projects using Teensy 3.2 and strands of 144 APA102's. Each project had a 74AHCT125 to level-translate. It would be great if there were two pins of 5v level output for the APA102's, one for clock, one for data. One pin isn't enough for the APA102.
  47. D

    8 x 1.44/1.8'' inch 128x128 128x160 TFT Full Color SPI LCD Display Modules over SPI

    I was able to get six 1.44" displays running on a Teensy 3.2. I used SCK on 14, MOSI on 11, DC on 21. I used CS on 10, 9, 15, 20 (normal CS pins) plus pins 3 and 4. With the SPI clock at 24 MHz the displays using pins 3 and 4 showed upside-down images. I tried slowing down the SPI clock and...
  48. D

    [posted] RCA 118 "tombstone" MP3 player

    Before the RCA 118 radio I worked on an old Zenith Console. A video of the Zenith project can be seen here: https://www.youtube.com/watch?v=BXV7gV87KoU
  49. D

    [posted] RCA 118 "tombstone" MP3 player

    I uploaded a video to Youtube: https://youtu.be/OKJOnvwOW8U
  50. D

    8 x 1.44/1.8'' inch 128x128 128x160 TFT Full Color SPI LCD Display Modules over SPI

    I was able to get six displays running off of a Teensy 3.2. I had to use the updated library from https://github.com/PaulStoffregen/ST7735_t3 dated July 7, 2019. I used SCK on 14, MOSI on 11, DC on 21. I used CS on 10, 9, 15, 20 (normal CS pins) plus pins 3 and 4. I had to change the SPI...
Back
Top