I have not been making much progress lately. I am trying to get the board to produce sound through its CS23L22 chip. So far, I've managed to:
- make it accept commands through I2C (which I know succeeded because, well, the commands do not timeout),
- enable and configure the I2S bus.
I've been sending data on it (basically a simple 440Hz sine wave), but there is no output. I know the bus' clock is configured correctly, because I've been pumping the data onto it directly through SPI3's data register, and toggling a LED every 22100 samples, which works just right (the LED blinks with a period of 2s). I also know that the chip works (because it does produce sound when I run the board's original firmware).
I'm quite sure it's something extremely silly I'm forgetting to do, or doing in the wrong order somewhere... but I have no clue where and what it is.
Ok, I've said it before, but repeating it one more time won't hurt: when it comes to electronics or hardware, I am completely ignorant. So, yesterday morning, I spent the best part of 3 hours trying to plug the STM32's UART ports on a PC DE9 interface, trying to get the code to work and fiddling with Minicom's settings.
Then I looked it up. As it turns out, signals from the microcontroller are encoded using TTL (where a voltage close to 0V indicates a zero, while a voltage close to the chip's power supply voltage indicates a one), while RS232 relies on a negative voltage to indicate a zero.
*cough* I felt really silly.
So I looked up how to interface both. There are many schematics and explanation on the web; this explanation is quite good, and I ended up using their schematics and some parts I already had to build one (well, I didn't add the LEDs because I didn't see much point in these).
Here's the result:
And, if that can help, here are the schematics for the board itself (not exactly the one shown above, as I'd made a bit of a mistake):
And the list of parts:
|R1 R2 R3 R4 R5||10kΩ|
I managed to get the TFT screen working this afternoon. For now I'm using bit-banging both to initialise the board and access the framebuffer, the idea being to try and use it with the STM32F4's FSMC later. I'm a little disappointed that the backlight is hardwired to the module's power supply (which means the SSD1963's backlight control can't be used) and that the tearing output pin is not connected at all. Ah well.
Just bought a few interesting toys:
The ITDB02-4.3 module includes a 480x272 LCD screen controlled by an SSD1963 chip, a resistive touch screen controlled by an XPT2046, and a SD card slot. For now, I only managed to get the touchscreen working (I've never programmed for an MCU before, so I'm a bit slow). My screwing around with the board and module can be found on GitHub.