

Tms5220-atmega
TMS5220 exploration unit
- Size
- 74.9 × 48.3 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 32
- Nets
- 37
- Pads
- 151
- Tracks, vias
- 306, 0
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 7 Apr 2020
- Updated
- 24 Apr 2020
Overview
Tms5220-atmega is an open-source printed circuit board by madworx, from the madworx/tms5220-atmega repository on GitHub. It is a 2-layer board of 74.9 × 48.3 mm with 32 parts on 37 nets, routed with 306 tracks and 0 vias.
It is built around the ATMEGA328P-PU, UB232R and TPS6735D. Its parts include 8 capacitors, 8 connectors, 6 ICs, 5 resistors and 3 diodes. It belongs with the AVR (ATmega, ATtiny) and NXP (LPC, Kinetis, i.MX RT) boards of this library.
Main components
3ATMEGA328P-PU
DIP-28-300mil-40℃~+85℃ 1.8V~5.5V 10bit 1KB 20MHz 23 2KB 32KB 8 Bit AVR Built-in FLASH DIP-28-300mil Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)UB232R
SMD,15x15mmUSB to UART、On-board regulator、USB to TTL SMD,15x15mm USB Conversion Modules ROHSFTDIUSB Conversion ModulesTPS6735D
UncategorisedTexas Instruments
README
README.mdTMS5220 Exploration unit
This project was created to try out the Texas Instruments TMS5220 Voice synthesis processor (of TI99/4A, Apple II Echo 2, and various pinball/arcade games fame).
First off, a word of warning: The PCB being powered by potentially three sources (PSU, Communication USB, AVR ISP), I've observed some weird behavior with power unexpectedly flowing in the wrong direction, causing intermittent system interruptions, host USB-port lock-up requiring system restart and one burnt MCU.
Preferably disconnect the PSU before connecting the ISP and move the J3 jumper to programming mode.
The project as it currently is is rather "build your own" but since the project was created to let me toy with the TMS5220 chip, it's not likely to see any major improvements in the forseeable future.

Software environment
avrdudeavr-gcc
Peripherials setup
Programmer (AVR ISP)
I used a cheap usbasp clone.
UB232R
The UB232R interface needs to be configured using the FT_Prog tool:
-
High Current I/O'sto be disabled. -
Under the
IO Controlssection, output on pinC0should be set toCLK12, providing the Atmega 328P with a system clock of 12MHz.
The baud rate is the USB interface is configured by the host operating system driver. The MCU UART baud rate need to be matched to this.
Atmega 328P
lfuseshould be programmed to external clock without /8DIV (0xE0):
avrdude -p m328p -c usbasp -U lfuse:w:0xE0:mTMS5220 details
D/A
10-bit twos-complement.
| | PC latice outputs | | |
|-----------|---------------------------------------------------------|------------|-------------|
| Value | YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 | D/A input | Analog (uA) |
|-----------|---------------------------------------------------------|------------|-------------|
| > +127 | 0 1 1 x x x x x x x x x x x | 11111111 | 0 |
| > +127 | 0 1 0 x x x x x x x x x x x | 11111111 | 0 |
| > +127 | 0 0 1 x x x x x x x x x x x | 11111111 | 0 |
| +127 | 0 0 0 1 1 1 1 1 1 1 1 x x x | 11111111 | 0 |
| +126 | 0 0 0 1 1 1 1 1 1 1 0 x x x | 11111110 | 5.86 |
| etc. | 0 0 0 . . . . . . . . x x x | ........ | ..... |
| +1 | 0 0 0 0 0 0 0 0 0 0 1 x x x | 10000001 | 738.00 |
| 0 | 0 0 0 0 0 0 0 0 0 0 0 x x x | 10000000 | 744.00 |
| -1 (off) | 1 1 1 1 1 1 1 1 1 1 1 x x x | 01111111 | 750.00 |
| -2 | 1 1 1 1 1 1 1 1 1 1 0 x x x | 01111110 | 755.80 |
| etc. | 1 1 1 . . . . . . . . x x x | ........ | ....... |
| -128 | 1 1 1 0 0 0 0 0 0 0 0 x x x | 00000000 | 1500.00 |
| < -128 | 1 1 0 x x x x x x x x x x x | 00000000 | 1500.00 |
| < -128 | 1 0 1 x x x x x x x x x x x | 00000000 | 1500.00 |
| < -128 | 1 0 0 x x x x x x x x x x x | 00000000 | 1500.00 |Timing diagram
ROMCLK= 160kHz (= 6,26uS = 75x 12MHz cycles -> 37.5 cycles per level):T11is pulled high before the start of each 10-bit word. (Note: TheT11/IOcycle will run as long as the TMS chip is powered, regardless if anySPEAKorSPEAK EXTERNALcommands are currently running or not.)
| 36| 36| 36| Clock cycles @ 12MHz
|
___ ___ ___ ___v ___ ___ ___ ___ ___ ___ ___ ___ ___
_| |___| |___| |___| |___| |___| |___| |___| |___| |___| |___| |___| |___| |___| *ROMCLK*
_______ :
_________| |___________:____________________________________________________________________________ *T11*
___:___________________________________________________________________________
_________________________| lsb | | | | | | | | | msb | *I/O*
^
|
+-- This is where we sample & store the value of I/O.Code structure
-
TMS5220 flag us that it's ready to receive data with the use of the
~READYsignal. -
On negative edge trigger: Sample I/O pin, shift storage byte and add bit. (This should be in the range of ~15 instructions)
-
On positive edge trigger: Perform state-based logic (max ~35 clock cycles to complete each operation).
-
A full write of
DBUSon the TMS requires us to write to three different ports on the Atmega. (~15 instructions each)
Accessing the USB UART under linux with 250000 baud rate
$ setserial -a /dev/ttyUSB0 spd_cust
$ setserial -a /dev/ttyUSB0 divisor 64 # for 375000
$ setserial -a /dev/ttyUSB0 divisor 96 # for 250000
$ stty -F /dev/ttyUSB0 38400
$ socat TCP-L:1147 FILE:/dev/ttyUSB0,b38400,raw,echo=0Afterthoughts on PCB design
- Atmega reset button on PCB would be nice.
- Proximity to other components makes the jumpers hard to access.
- Should have used a trimmer with lower resistance and a base resistor of higher value to enable more accurate tuning of
ROMCLK. - Possibly some form of "mode switch" to select different functions in the MCU.
- Could likely have been powered by USB directly, eliminating the external PSU. (However, need to take into account that +5 and -5V needs to be applied more or less simultaneous)
- Hard to dislodge the TMS chip due to resistor in the way.
- Bottom mounting of TMS resistor on PCB due to placement near socket edge -- has been fixed in current PCB layout, but not in manufactured ones.
- Hard to dislodge Atmega328P due to resistor in the way -- has been fixed in current PCB layout, but not in manufactured ones.
- A status LED or two would be nice.
- Reading more about the TMS chip, I could have driven the "TESTING USE ONLY"
PROMOUTpin to -5 to enable external clocking, removing timing constraints for the MCU. - The "programming mode" jumper in the end turned out quite useless -- a proper RESET of the TMS-chip usually cleared up any inconsistencies.
- Multiple pins connected to TMS5220 that in the end weren't needed.
- Power drainage is much higher than expected; Around 500mA and LM7805 reaches 51 degrees C.
Oscillator caps
TMS5220 T11, ROMCLK, IO

TMS5220 ROMCLK output

UB232R-CLK12

Connected to Atmega328P:

References
Parts
32| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 220 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical | R1, R2 |
| 2 | LED | LED_THT:LED_D3.0mm | D2, D3 |
| 1 | +5V | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | J6 |
| 1 | -5V | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | J7 |
| 1 | 0.1u | Capacitor_THT:CP_Radial_D4.0mm_P1.50mm | C9 |
| 1 | 0.33u | Capacitor_THT:CP_Radial_D4.0mm_P1.50mm | C8 |
| 1 | 100u | Capacitor_THT:CP_Radial_D4.0mm_P1.50mm | C6 |
| 1 | 10k | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical | R5 |
| 1 | 10p | Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm | C2 |
| 1 | 10u | Capacitor_THT:CP_Radial_D4.0mm_P1.50mm | C4 |
| 1 | 10uH | Inductor_THT:L_Axial_L11.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_MECC | L1 |
| 1 | 1u | Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm | C3 |
| 1 | 200k | Potentiometer_THT:Potentiometer_Bourns_3296W_Vertical | RV1 |
| 1 | 3k3 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R4 |
| 1 | 47k | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical | R3 |
| 1 | 47u | Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm | C7 |
| 1 | 47u | Capacitor_THT:CP_Radial_D4.0mm_P1.50mm | C5 |
| 1 | 74LS138 | Package_DIP:DIP-16_W7.62mm | U5 |
| 1 | ATmega328P-PU | Package_DIP:DIP-28_W7.62mm_Socket | U1 |
| 1 | AVR-ISP-6 | Connector_IDC:IDC-Header_2x03_P2.54mm_Vertical | J1 |
| 1 | Barrel_Jack_MountingPin | Connector_BarrelJack:BarrelJack_CUI_PJ-063AH_Horizontal | J2 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
| 1 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J3 |
| 1 | D_Schottky | Diode_THT:D_DO-41_SOD81_P2.54mm_Vertical_AnodeUp | D1 |
| 1 | GND | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J8 |
| 1 | LM7805_TO220 | Package_TO_SOT_THT:TO-220-3_Horizontal_TabDown | U4 |
| 1 | ROMCLK | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | J4 |
| 1 | TMS5220 | Package_DIP:DIP-28_W15.24mm_Socket | U2 |
| 1 | TPS6735 | Package_DIP:DIP-8_W7.62mm | U3 |
| 1 | UB232R | UB232R:UB232R | IC1 |
Similar boards
- 2 layers

- 2 layers68.8 × 53.6 mm

ZArduino
zmaker/arduino_cookbook
gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube
46 parts269 - 2 layers76.3 × 122.8 mm

Discipad pcb
coseyfannitutti/discipad
17-key numpad assembled with only through hole components, including usb type-c
63 parts221GPL-3.0 - 2 layers111.3 × 106.4 mm

Super Sixteen v1
matthewcieplak/super-sixteen
Code and schematics for the Super Sixteen Eurorack sequencer
141 parts171 - 2 layers247.6 × 99.2 mm

Romeo pcb
coseyfannitutti/romeo
Staggered 40% keyboard pcb that can be assembled with only through hole components, including USB Type-C
138 parts148GPL-3.0 - 2 layers90 × 140 mm

Drumkid
mattybrad/drumkid
Version 4 was the first successful working design, with full code, schematics, Gerbers, etc available on GitHub.
70 parts137 - 2 layers238.1 × 375.5 mm

- 2 layers

LM80C R6
leomil72/LM80C
A Z80-based homebrew computer withTMS9918, AY-3-8910, Z80 CTC, Z80 PIO, and Z80 SIO
153 parts123GPL-3.0
Questions
How big is the Tms5220-atmega PCB?
It measures 74.9 × 48.3 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Tms5220-atmega use?
32 parts, built around the ATMEGA328P-PU, UB232R and TPS6735D. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Tms5220-atmega KiCad files?
From the madworx/tms5220-atmega repository on GitHub, at the commit this page was made from: the board is hardware/TMS5220-Atmega.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Tms5220-atmega design in my own project?
Its repository states no licence, so its author keeps all rights: ask madworx before reusing the design.