the quest for sound

A project log for LAMEBOY - another ESP12 handheld

fully portable ESP12 project with battery charging and power muxing

davedarkodavedarko 02/15/2018 at 11:5512 Comments

I'm currently looking into getting a sound pin and the most likely candidate right now is the LCD reset pin. Did anyone ever had any problems not using the reset pin of the Nokia LCD? What could I test to make sure it works fine? worst case scenario is turning the lameboy on and off again, I guess. I could try using RX and TX for sound, where depending on the TX state the RX would emit sound (no modem noises while uploading if done right). But if I could free the RST pin for sound, then I could use the same idea for RX and TX to transmit IR maybe. Would be cool features to have, I think. 

Also to consider:


ajlitt wrote 02/20/2018 at 14:36 point

Switch to ESP-12F and use GPIO9 and GPIO10.

  Are you sure? yes | no

davedarko wrote 02/20/2018 at 15:26 point

Wait, that works? I thought they were unusable because they're used for communication with flash? 

  Are you sure? yes | no

ajlitt wrote 02/20/2018 at 17:34 point

You would have to run the SPI flash in DIO mode to get control of those pins and you would need to make sure that /HOLD (GPIO9) isn't asserted when doing SPI flash accesses, and /WP (GPIO10) isn't asserted when the flash is being written.

  Are you sure? yes | no

davedarko wrote 02/16/2018 at 20:59 point

@Sven Gregori cool, thanks for sharing that :) I currently only have tested that with a huge delay (I've placed testing the sound before initialising the display) I need to check that with a oscilloscope or digital analyzer or something - I've used the values from Radomirs link of the OLED schematics.

  Are you sure? yes | no

de∫hipu wrote 02/15/2018 at 12:38 point

The datasheet says:

Immediately following power-on, the contents of all internal
registers and of the RAM are undefined. A RES pulse
must be applied. Attention should be paid to the
possibility that the device may be damaged if not properly

  Are you sure? yes | no

de∫hipu wrote 02/15/2018 at 12:39 point

However, you might be able to do it with a simple dumb circuit.

  Are you sure? yes | no

davedarko wrote 02/15/2018 at 12:44 point

like a power on reset thing with a resistor and capacitor?

  Are you sure? yes | no

de∫hipu wrote 02/15/2018 at 12:45 point

Yeah, I think so. I think the popular OLED displays have a similar requirement, and the modules have that circuit on them — you could steal that.

  Are you sure? yes | no

Sven Gregori wrote 02/16/2018 at 20:37 point

I've experimented once replacing the RST pin with an RC circuit that kept the pin low for a short time after power up, and it more or less worked.

They key is to keep the pin low long enough that the reset signal is detected, but short enough to have the LCD ready by the time your controller starts sending data to it. I didn't consider the second part at the time, so it succeeded maybe 2/3 times -- that's why the "more or less".

  Are you sure? yes | no

de∫hipu wrote 02/15/2018 at 12:27 point

I'm not sure GPIO0 is such a good candidate, as there is a pullup on it, and furthermore, if you have a load connected to it at boot, it might interfere with the boot process. I would put the I2C bus on GPIO0 (SCL) and GPIO2 (SDA) (additional bonus, you save two resistors, as they already have pullups), and use the GPIO4 and GPIO5 for D/C and sound (if you manage to free the RST pin). Other idea would be to use the Attiny's pin...

  Are you sure? yes | no

davedarko wrote 02/15/2018 at 12:48 point

why is the pullup not a good thing? seems like it's a good way to not have noise on the speaker? I could still invert the signal, so high means low on the speaker (?). 

  Are you sure? yes | no