4 ms·
Hey nice work! This new silicon that is not tolerant of 5v inputs grinds my gears. I wonder if you could have used zener diodes instead of a more complicated
by kw71 10y ago
Hey nice work! This new silicon that is not tolerant of 5v inputs grinds my gears. I wonder if you could have used zener diodes instead of a more complicated level shifter to stay on the STM32. I really don't like the avr anymore.
- leoedin 10y agoI think the problem was that the flash chip was designed to work at 5V, so he'd have had to provide level shifting or buffering for all the outputs to the flash chip. There are ARM microcontrollers from both Atmel and NXP (LPC) which are 5V tolerant, but I'm not aware of any which can provide a 5V output.
- kw71 10y agoBut these GPIO's are generally not sources of Vcc/Vdd. Without reading technical details about the actual chip, I always assume they are weak pullups to Vcc/Vdd, that are shunted to ground (Vee/Vss) when 0. So, a 5v pullup on the 'memory chip' side would satisfy the memory chip's 'high' threshold, the zener would protect the 3v3 device, and its shorting to ground would be a legitimate 0.
- cnvogel 10y agoIf you go to the effort to make a nice circuit board, and need to interface 3.3v to 5v logic it doesn't really pay off to skimp on, e.g. a proper voltage translator. [e.g. SN74LVC4245] Why? Because it's giving you worse results: Slew time with open-collector/pullup signals is pretty bad because of the 0->1 transision the trace capacitance is charged up via the pullup rather slowly (compared to a proper CMOS driver). Also, for 8 signals you'll need to populate 8 resistors, 8 clamping zeners. Needs more space than a single SOIC-20, which provides you with proper bidirectional drivers. In this special case, though, the inputs of the NOR flashes seem to be happy to be driven by 3.3V, the datasheet requires Vinh (voltage input high) to be >2V (likely to be compatible with old TTL logic which had this threshold voltage). So all inputs to the NOR flash could be directly connected to a 3v3 microcontroller, leaves only the 8 bidirectional data pins and the "Ready" pin RY/BY#. So, I'd probably take a bidirectional level shifter for the data bus, skimp on the single "Ready" pin and only use a resistors, as this signal is only interesting during erase anyway. Then everything else could be directly connected to any 3.3v compatible microprocessor. That way all signals that need to be fast are fast, there's a minimized component count, and the single remaining signal would be for me to be ridiculed for my lack of rigor :-).
- Declanomous 10y agoI think this conversation is kind of orthogonal to the actual issue, which is that setting up the hardware to shift 32 signals from 3.3v to 5v is pretty easy. I definitely wouldn't consider it a "major pain." Interfacing parts which use two different logic levels is incredibly common, and there are many inexpensive ICs that provide bidirectional level shifting. That being said, I think choosing a microcontroller which uses the logic level you need is a perfectly acceptable solution. Minimizing the number of components goes a long way towards making a project easier to manage.
- cnvogel 10y ago> choosing a microcontroller which uses the logic level you need is a perfectly acceptable solution. Absolutely!
- makomk 10y agoThe STM32 chips are generally 5V tolerant, but there's no guarantee that the memory will like 3.3V inputs. (The Atmel ARM chips used in the newer Arduinos unfortunately aren't though.)