Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 19 of 19

Thread: Teensy 4.1 and audio board - volume pot

  1. #1
    Senior Member
    Join Date
    Sep 2019
    Posts
    225

    Teensy 4.1 and audio board - volume pot

    Hello
    Simple question. I have a 4.1 and the dedicated audio adapter board.

    Pin 15/A1 is noted for use as an external volume pot. I don't need this.
    Can I simply use this pin as I/O, or do I need to do something to disable this volume feature (is possible) first?

    Thanks

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,387
    The audio shield has a capacitor connected to that pin. You might wish to desolder that capacitor, or cut the wire / pin between Teensy and the audio shield, so the capacitor doesn't affect whatever signal you connect to pin 15.

  3. #3
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Thank you Paul for the prompt reply. I will look into that. Just getting a bit tight for pins! (Which I didn't think would happen on a 4.1).

    As a side question about my 4.1. I would possible like to add multiple OctoWS2811 Adaptors to my 4.1, as I currently run my RGB signals directly off the board.
    But, I don't have many pins available (certainly not the ones that the OctoWS2811 Adaptor shield uses).

    Are there any possible methods you can think of to interface say 4x OctoWS2811 Adaptors to a Teensy 4.1 using minimal pins? Would some kind of multiplexer work?, or would that slow the data too much?

    I am also looking at the PSRAM Chip board. I would like to add several EEPROM IC's to my breadboard. Is there a limit to how much EEPROM and PSRAM you can add to a 4.1? (assuming no address/pin clash issues)
    Last edited by SteveSFX; 04-08-2022 at 10:21 PM.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,387
    I don't really understand the reason or rationale behind these questions, so here's some raw technical answers...

    OctoWS2811 has a pinlist feature which lets you use any combination of pins on Teensy 4.1. Of course with the pre-made OctoWS2811 shield, you'd need wires to route the signals from other pins.

    If you're willing to build some hardware rather than use the pre-made boards (part of the context I'm not understanding...), TriantaduoWS2811 is probably your best path to controlling a lot of LEDs using the fewest pins.

    https://github.com/wramsdell/TriantaduoWS2811

    On PSRAM, 2 chips is the limit, at least for their RAM to be used as ordinary memory. More can be connected by SPI, but you would need to write code to talk to them over SPI. There isn't any way to just declare variables or arrays with EXTMEM, as you can with the 2 locations on the bottom side of Teensy 4.1.

    Usually EEPROM chips are I2C. Most of them have 3 pins to configure address, which limits you to 8 chips on each set of I2C pins. But they come in pretty large sizes. With SPI each chip needs a CS pin, and eventually with too many the SPI signals get enough load that you might need slower clock and/or buffer chips.

    But again, not understanding your project, I can't imagine why you'd go to the trouble of so many EEPROM chips when you could connect 1 large SPI flash chip and use LittleFS.

  5. #5
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Sorry Paul. Just playing around with ideas for my own board.

    Never heard of LittleFS... Just looked it up. Interesting idea with regards to a large SPI chip and LittleFS.

    Used I2C EEPROMS before (I have some 24LC256 here now).

    As for the RGB leds, I was just looking for a way of freeing up pins. It's not for a specific project, so I will look at the TriantaduoWS2811

    Thank you for the advice

  6. #6
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Would not have minded having a go with that TriantaduoWS2811 code, but I cannot find any sn74ah595 anywhere in the UK. Hmm
    Not sure I have the knowledge to identify an equivalent

    update...

    https://uk.rs-online.com/web/p/counter-ics/1869597

    I think this would work

  7. #7
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    386
    Quote Originally Posted by SteveSFX View Post
    ...but I cannot find any sn74ah595 anywhere in the UK.
    Being in the US, not sure if either Adafruit or SparkFun are available for you in the UK. If the 74HC595 will work for your application, Adafruit sells the individual ICs (3-pack) & SparkFun sells a convenient breakout board.

    Hope that helps . . .

    Mark J Culross
    KD5RXT

  8. #8
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    782
    @SteveSFX: the OnSemi 74VHC595MX does not have TTL-compatible input levels.
    So, if you want to use it as a levelshifter as well by powering the part from 5V, like wramsdell suggests, it is not guaranteed to work with the Teensy 3V3 output levels.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	2 
Size:	27.4 KB 
ID:	28058

    Just be aware...
    Paul

  9. #9
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Ah thank you... I would have come unstuck there then!

    I will check Sparkfun in a moment. I ideally was looking for SMD, but beggars can't be choosers these days!

  10. #10
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Nope .... nobody has them.... even AliExpress!

    That original link actually calls them sn74ahct595, but I am assuming that is a typo or discontinued, as I cannot find that part at all

  11. #11

  12. #12
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    782
    Quote Originally Posted by SteveSFX View Post
    Nope .... nobody has them.... even AliExpress!
    Are you sure? See https://uk.farnell.com/c/semiconduct...s?st=74ahct595

    Paul

  13. #13
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    754
    and some more...
    Click image for larger version. 

Name:	zz.jpg 
Views:	7 
Size:	87.8 KB 
ID:	28059

  14. #14
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    What the heck was I searching for then? Useless

    Thank you for all your help

  15. #15
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    May I ask further stupid questions?

    This wiring diagram. Serial data in (SER) is a serial output from the Teensy 4.1.
    Is Latch clock (RCLK) the same as the SCLK on the SPI bus?
    Bit Clock (SRCLK) is the same as CS?
    Maybe vise-versa

    Or... do they have to be their own 3 allocated pins, and this has zip to do with SPI comms. Looking at the datasheet (which is baffling to me), it looks like they are their own thing.

    Click image for larger version. 

Name:	TriantaduoWS2811 diagram.png 
Views:	4 
Size:	57.4 KB 
ID:	28070

  16. #16
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    782
    From this file, it looks like pin 2 = SRCLK, pin 3 = RCLK & pin 4 = SER have been defined:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	5 
Size:	26.3 KB 
ID:	28071

    So zip to do with SPI comms.

    Paul

  17. #17
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    Thanks, I will design them to have dedicated pins then.

  18. #18
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,748
    Quote Originally Posted by SteveSFX View Post
    Nope .... nobody has them.... even AliExpress!

    That original link actually calls them sn74ahct595, but I am assuming that is a typo or discontinued, as I cannot find that part at all
    [ The SN is a manufacturer-specific code, the generic part number is 74AHCT595. ]

    Just use 74HCT parts for 3.3 -> 5V level conversion. AHCT is a more obscure family to HCT (slightly faster?).

    HCT run at 5V, but accept 3.3V logic input signals correctly. Basically HC are "High speed CMOS", HCT are "High speed CMOS TTL-compatible",
    noting that TTL thresholds are 0.8V and 2.4V, ie basically like 3.3V CMOS.

    Don't be caught out by the wikipedia page on 74xx families, it erroneously lumps HC with HCT and AHC with AHCT, these have different
    supply requirements (the "T" versions only run at 5.0V as they are designed as TTL replacements.).

  19. #19
    Senior Member
    Join Date
    Sep 2019
    Posts
    225
    It's a minefield!

Posting Permissions

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