Search results

  1. D

    RA8876LiteTeensy For Teensy T36 and T40

    Looks like the Lite library uses genitopCharacterRomParameter() to select the external font ROM. Something like: genitopCharacterRomParameter(RA8876_SERIAL_FLASH_SELECT1,RA8876_SPI_DIV4,RA8876_GT30L32S4W, RA8876_ASCII, RA8876_GT_VARIABLE_WIDTH_ARIAL); or...
  2. D

    RA8876LiteTeensy For Teensy T36 and T40

    Here's the code from the library I've been using. The entries might be named something else in the current library: void RA8876::initExternalFontRom(int spiIf, enum ExternalFontRom chip) { // See data sheet figure 16-10 // TODO: GT30L24T3Y supports FAST_READ command (0x0B) and runs at...
  3. D

    RA8876LiteTeensy For Teensy T36 and T40

    With an older version of the library I used ExternalFontRom rom = RA8876_FONT_ROM_GT30L32S4W; tft.initExternalFontRom(0, rom); tft.selectExternalFont( RA8876_FONT_FAMILY_TIMES, RA8876_FONT_SIZE_16, RA8876_FONT_ENCODING_ASCII); then to switch to Arial I only had to use...
  4. D

    Teensy 4.1 Problem setting output pin before its declaration

    You could try tying just the pull-up for the gate input of the 74HC595 to the Teensy's 3.3v regulator. The rest of your circuit can continue to use the your 3.3v supply.
  5. D

    Teensy 4.1 Problem setting output pin before its declaration

    Have you tried setting the pin mode to "INPUT_PULLUP" before setting the pin mode to "OUTPUT"? Like: extern "C" void startup_middle_hook(void); void startup_middle_hook(void) { pinMode(24, INPUT_PULLUP); pinMode(24, OUTPUT); digitalWriteFast(24, HIGH); } The pin will start in...
  6. D

    teensy 4.1 coding guidance for USB serial communication

    My point is that to make Python run fast the library is in C/C++ and not native Python.
  7. D

    teensy 4.1 coding guidance for USB serial communication

    I hate to tell you this, but Numpy and Scipy are not written in Python. They have a Python interface, but the "optimized, vectorized libraries" are written in C/C++.
  8. D

    Noise Issue with Teensy 4.1, Audio Shield, and PAM8403 Amplifier

    I used this 12v 5A Switching Power Supply to feed the barrel connector on this Stereo 20W Class D Audio Amplifier. I replaced the included power supply capacitor with a low-ESR aluminum-polymer capacitor. I used the power supply screw terminals on the amplifier to feed a small circuit board...
  9. D

    Noise Issue with Teensy 4.1, Audio Shield, and PAM8403 Amplifier

    Would something like this 2.5W mono amp work for you? I've used a Class D amp in a project, only using the stereo outputs of a Teensy 3.6. I powered a 20w stereo class-D amp with a 12v wall brick, and used a 12v to 5v regulator to power the Teensy 3.6. The only problem I had was with a...
  10. D

    Daisy Chain SPI Shift Register Control with Teensy 4.1

    How did you get 44.1 kHz using a 22.05 kHz interrupt? Looks to me like it was 11.025 kHz.
  11. D

    Teensy 4.0/4.1 Serial1.AttachCts

    CTS is an input, RTS is an output. The output of an 74HC14 inverter connects to the CTS-XBAR pin. The RTS signal from the other teensy connects to the input of the 74HC14 inverter. The diagram here: uart flow control may help. You can ignore the "Legacy Hardware Flow Control" section.
  12. D

    Teensy 4.0/4.1 Serial1.AttachCts

    You will indeed need to invert the CTS output. If you switch to Serial3 instead of Serial1 you can use pin 19 for CTS and not need an inverting buffer. If you can't use Serial3 and have two unused pins on your teensy you can build your own inverter in software, just tie your CTS pin to an used...
  13. D

    looking for recommendation for selector knob

    I've used a 12-position rotary switch as an input. I put 1K resistors between each terminal, creating a voltage divider. The last terminal goes to ground, the first terminal through another 1K resistor to +3.3v. The wiper goes to an analog input. I used a tree of "if" statements to detect...
  14. D

    How to use attachInterruptVector in Teensy 4.1 with Teensyduino to call instruction when Serial write buffer has transmitted all bits

    You could use "Serial3.flush()" rather than "delayMicroseconds(1150)". The flush() call will block until all the data has been transmitted. Information on the serial hardware is listed at td_uart.html
  15. D

    Teensy 4.1 Problem setting output pin before its declaration

    Here's another link describing the startup hooks: td_startup
  16. D

    Teensy 4.1 Problem setting output pin before its declaration

    There are many housekeeping steps performed before setup() is called. The Teensyduino environment has three hook routines that are called before setup(), so you can customize the startup. Here's a posting that describes the hooks: setup hooks In your case I'd use the "setup_middle_hook()"...
  17. D

    Humidity issues

    I've had similar problems, due more to power cycles than humidity. In my case they are teensy 3.6 processors that are indoors. I just had another teensy 3.6 lose programming, in a totally different project than the ones described here.
  18. 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.
  19. 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.
  20. 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...
  21. 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...
  22. D

    Timelib.h and Daylight saving Time

    I use this library: Timezone
  23. 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...
  24. 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...
  25. 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...
  26. 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...
  27. 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] =...
  28. 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...
  29. 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...
  30. 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...
  31. 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...
  32. 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...
  33. 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...
  34. 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("----------------------------")...
  35. 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...
  36. 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...
  37. 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 ==...
  38. 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.
  39. 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...
  40. 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...
  41. 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.
  42. 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.
  43. 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...
  44. 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...
  45. 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.
  46. 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.
  47. 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...
  48. D

    Uncanny Eyes is getting expensive

    Have you tried the "skip blank scanline" optimization? I'm curious what speed up you see.
  49. 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...
  50. 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...
Back
Top