8-bit Videoconsole With a LED Matrix As Screen

by MakingDevices in Circuits > Gadgets

428 Views, 5 Favorites, 0 Comments

8-bit Videoconsole With a LED Matrix As Screen

console_finished.jpg
screenshot.jpg

Pic Bytes Micro was born to explore the capabilities of C language inside the PIC18F4550, as I wanted to test if the 8bit microcontroller was able to run some old games such tetris, snake or arkanoid. To maintain the old-fashion look of the project, the screen is made by 16x10 matrix of LEDs, controlled by individual transistors and the IO pins of the PIC. In addition, sounds and a rechargable battery will be added to the device.

Supplies

Github Repository

  1. Get the gerber files for the latest version: V1.25
  2. Send them to a PCB manufacturer (Our Sponsor is PCBWAY)
  3. You can read the schematics
  4. The firmware is available on the repo
  5. For most of the components, you can reach to Würth Elektronik, our sponsor for electronic components

The Screen

screen_schematic.JPG
screen.jpg

The massive screen of 160 LEDs from Wurth Elektronik is formed by a matrix controlled by 20 output pins on the PIC18F4550. LEDs can be selected from a variety of optoelectronic components and colours.

Typical NPN transistors are used to switch between rows and columns of LEDs. We have divided the screen into four areas so that we can control and reduce the number of IO pins used. The refresh ratio of the screen is one row every 2ms, having a refresh rate of 32ms for the entire screen. The final refresh date is 31.25 Hz, more than enough for the games we will be programming.

The BMS

BMS_schematic.JPG

The BMS can be divided in three parts:

  • TP4056: The famous chip that will charge any Li-Ion battery from the USB port of the device.
  • AP9214L: It is the battery protection IC. It will disconnect the battery in case of undervoltage, overcharge voltage, overcurrent... and so much more.
  • TPS61085T: It is the boost converter that level up the voltage from the battery to a stable 5V for the microchip and the electronics.

The Main Chip

main_schematic.JPG

The circuit is built around the PIC18F4550. It is an 8-bit microcontroller with 32Kb program memory size and 2048 bytes of RAM. It also has 256 bytes of EEPROM, which will be fantastic for the scoreboard and the settings.

Despite the small amount of memory available, the IC has 13 ADC channels with a resolution of 10bits (which will be used to identify the battery voltage), it operates up to 5.5V, and the pin count increases up to 40 IO, which are extensively used to control the screen, read the buttons and make some music with the buzzer.

The PCB Design

kicad_3d1.JPG
kicad_3d2.JPG
kicad_pcb.JPG
picbytesmicro_pcb1.jpg
picbytesmicro_pcb2.jpg

The PCB is a four layer PCB made by PCBWAY. Remember you have the gerber and all the files in the github repository!

https://github.com/makingdevices/PicBytesMicro/tree/main/Gerber

Soldering the Chip

smd_2.jpg
smd_1.jpg
smd_3.jpg
smd_4.jpg

I strongly recommend to buy a stencil to spread the solder paste.

In my case, I soldered all the smd components (The top layer first, indeed) so I was able to use a reflow heatplate for the 160 LEDs of the screen.

Once all the SMD components are soldered, I started soldering the TH components. Last but not least, solder the battery.

Software and Burn the Chip

Finally! The 8-bit videoconsole is finished and all the software is done 🤩🤩 #microchip #videoconsole
memory.JPG
chip.JPG

You will need a Tag-Connect 6-pins cable for the ICSP on the board. You will find the code here:

https://github.com/makingdevices/PicBytesMicro/blob/main/Simulation%26Firmware/Compiled/PicBytesMicroV1.25.hex

Or from the attached file. You should use MPLAB and C18++

The code is available at:

https://github.com/makingdevices/PicBytesMicro/tree/main/Simulation%26Firmware/Soure%20%26%20simulations

Final Result

My 8-bit videoconsole is finally done and programmed! #microelectronics #electronics #microchip
screenshot.jpg

In the video you will see the different versions:

  • Prototype: Fully operational. I almost gave up when soldering everything by hand, more than 40h (probably more!) to have the first version assembled.
  • V1: The programming pins of the PIC18F4550 were not in position. There also wasn't a battery protection IC.
  • V1.2: Everything was working BUT one button! dammit :/
  • V1.25: Everything was working PLUS I added a battery voltage detector using the ADC of the PIC, and now I can control the state of the battery.

Everything you see here is Open Source, and the project is OSHWA certified: ES000047

Links and Sponsors

screenshot.jpg
wurth_1.jpg
picbytesmicro_pcb2.jpg
wurth_3.jpg

First of all, if you like my projects, I strongly recommend you to follow us on our Instagram profile, Where you will be updated on a daily basis.

In addition, you have my tree-link website to check all my social media and website!

https://makingdevices.com/links/

If you want to support Making Devices, there is also a YT channel that we are hoping to start very soon.

Now, I want to thank to my sponsor as they help me to build this projects:

Wurth Elektronik is one of the leading manufacturers of electronic and electromechanical components. The best I can say about them is to show you some pictures: All the LEDs from the board are from them. They also have buttons, resistors and capacitors that we use in all our PCBs.

Finally, I would like to thank PCBWAY, the sponsor of this project. I really recommend you pay them a visit if you are thinking of ordering some Gerbers at any time in the future. I am truly impressed with how good they work and the high quality of their PCBs.