How to flash LPC810 or LPC812 MCU - Kyuchumimo/Micro-Joy-Home-Video-Computer GitHub Wiki
This part is a microcontroller, but can be reprogrammed to function as a sound chip thanks to the SoundCortexLPC project by Takashi Toyoshima.
SoundCortexLPC has 4 different versions.
- SoundCortex_PSG.hex -> For LPC810 MCU. PSG only via I2C protocol
- SoundCortex_PSG_SCC.hex -> For LPC810 MCU. PSG + SCC via I2C protocol
- SoundCortex_SPI_PSG_SCC.hex -> For LPC810 MCU. PSG + SCC via SPI protocol
- SoundCortex_812_IOEXT_PSG_SCC.hex -> For LPC812 MCU. PSG + SCC via IOEXT protocol
(for I2C/SPI protocol you need to build it yourself with the source code using MCUXpresso IDE)
Note: To use the I2C protocol, it requires that you place 1K ohm pull-up resistors on the SDA and SCK lines.
Also, I2C is a protocol that uses acknowledge polling, so if you don't have this part, the library software will fail.
To flash the microcontroller, you need to have a USB to TTL/UART/Serial adapter.
Below is a list of the most popular parts:
- CH340G
- FT232RL
- PL2303
- CP2102
You will also need to download Flash Magic
Go to the download tab, get the latest version and install it.
The installation process is straightforward. Accept the terms and conditions, Next, Next, Next, Next, Install, Finish.
Note: Both the LPC810 and LPC812 only tolerate power supply and voltage levels of 3.3v. Check that the USB to TTL adapter has a 3.3v output. Some of them need to open them and change the power output connection. If your adapter does not have a 3.3v output, you will need to use a 3.3v voltage regulator.
Below is a list of the most popular parts:
- AMS1117-3.3
- MCP1700-3302E/TO
- L78L33ACZ
In addition, these voltage regulators require 0.1uF bypass capacitors on VIN and VOUT.
The connections to flash the LPC810 microcontroller are as follows:
The connections to flash the LPC812 microcontroller are as follows:
Note: To use the LPC812 microcontroller on a breadboard requires a SOP20 to DIP20 adapter or equivalent.
- In the Flash Magic software select your device (for LPC810 select LPC810M021FN8 (LPC800), for LPC812 select LPC812M101JD20 (LPC800) or equivalent).
- Then select the COM port that your PC has assigned to the USB to TTL adapter (you can check in the device manager in the Ports (COM and LPT) category).
- Finally in baurate select 115200.
Note: To check that your microcontroller is alive and responding to communications, go to ISP > Read signature..., if all goes well, you should get a window showing your microcontroller signature, bootloader version and serial number, otherwise you will get an error window. In that case check the error message to find the problem, check that the COM port is correct and that the circuit connections are well done.
- Upload the .hex file that suits your requirements
- Press Start and you are done.