From Papilio

Papilio: ClassicComputingShield

Hardware | Papilio DUO - Papilio One - Papilio Pro - MegaWings - Wings - Shields

Computing Shield SD-Card
Computing Shield VGA
Computing Shield Sound
Computing Shield Joystick
Computing Shield RS232 UART
Computing Shield Directional Butons
Computing Shield Led's
Computing Shield Keyboard and Mouse

Computing Shield

The Computing Shield provides all of the hardware needed to recreate computing systems on the Papilio DUO.




Classic Computing Shield SD-Card

A microSD socket that provides several Gigabytes worth of file system space for classic computing systems.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
SD CDInputCard DetectD3AL3B4P119
SD MISOInputMaster In Slave OutD2AL2B5P118
SD MOSIOutputMaster Out Slave InD14BL7B6P115
SD SCKInput D15BL6C6P114
SD CSInputChip SelectD16BL7C7P112

Classic Computing Shield VGA

The VGA section of the Computing Shield uses 12 resistors to implement 4K color depth. VGA video is analog in nature so there needs to be some way to vary the RGB (Red, Green, and Blue) signals between 0V and .7V. For each RGB signal the shade, or intensity, of the color is controlled by varying the voltage of the pin between 0 and .7V. The finer control you have over the voltage the more colors you can create. For the Computing Shield we are able to control 4 different bits per color which allows us to generate 16 different voltage levels between 0 and .7V. This means we can generate 16 shades for each color. If we add all three colors together we have 12 bit video which gives us (2^12=4096) the possibility of 4096 colors.

The usual options for controlling voltage on a pin are to use a DAC, PWM, Delta-Sigma, or a resistor ladder. For the Arcade Wing we wanted to use the lowest cost and easiest method for a hobbyist. PWM and Delta-Sigma were ruled out because we did not think we would be able to vary the voltage with these methods fast enough to keep up with the VGA timing requirements. A DAC would be a good solution but was more than we needed for our modest requirements. A resistor ladder fit the bill perfectly because it is very low cost and easy to implement. The resistor ladder is made up of 4 resistors per RGB color that all connect, in common, to the VGA connector on one side and individually to a digital I/O pin on the other side. The lowest resistor starts at ~500 ohms and each successive resistor doubles in size with the final resistor ending with ~4K ohms. Each digital I/O pin is controlled by the VGA controller inside the FPGA. Each pin can be set to either 0 or 1 with a 1 causing the resistor to contribute its voltage to the final voltage level. The voltage can be stepped up from 0 to the desired output voltage which in this case is .7V.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
Red1OutputRed Bit 1D52CH7 P47
Red2OutputRed Bit 2D50CH6 P50
Red3OutputRed Bit 3D48CH5 P55
Red4OutputRed Bit 4D46CH4 P57
Green1OutputGreen Bit 1D38CH0 P75
Green2OutputGreen Bit 2D40CH1 P67
Green3OutputGreen Bit 3D42CH2 P62
Green4OutputGreen Bit 4D44CH3 P59
Blue1OutputBlue Bit 1D26CL2 P93
Blue2OutputBlue Bit 2D32CL5 P83
Blue3OutputBlue Bit 3D34CL6 P81
Blue4OutputBlue Bit 4D36CL7 P79
VSyncOutputVertical SyncD24CL1 P97
HSyncOutputHorizontal SyncD22CL0 P99

The way the desired output voltage is accomplished is by carefully managing the parallel voltage that the 4 resistors add up to. Using a Parallel Resistance Calculator we see that 500 ohm, 1000 ohm, 2000 ohm, and 4000 ohm give a total resistance of 266 ohm. The final key bit of information is that there is a 75 ohm resistance built into VGA cables, so that means that the point where our 4 resistors come together on our VGA connector forms a Voltage divider circuit. Using a Voltage Divider calculator with 3.3V as the Input Voltage, 266 ohm as R1, and 75 ohm as R2 we end up with an Output Voltage of .73V. The end result is that if all 4 resistors are set to Ď1í then we will see .73V at the VGA connector. If all 4 resistors are set to Ď0í then we will see 0V at the VGA connector, any combinations in between will give us evenly stepped voltages between 0 and .73V. The voltages will be evenly stepped because we picked resistors that double in size.

Classic Computing Shield Sound

The sound section implements a 1/8th inch mono jack with a low pass filter. Projects simply implement a Delta-Sigma DAC as outlined in Xilinx App Note 154. A Delta-Sigma DAC allows high quality audio to be implemented with a minimum amount of physical hardware required. The high speed of the FPGA clock allows the FPGA to do the heavy lifting of the Digital to Analog conversion.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
Audio1-LeftOutputAudio Output1 LeftD28CL3 P88
Audio1-RightOutputAudio Output1 RightD30CL4 P85
Audio2-LeftOutputAudio Output2 LeftD45DL4 P58
Audio2-RightOutputAudio Output2 RightD43DL5 P61

Classic Computing Shield Joystick

The Computing Shield supports Atari 2600, Commodore 64, classic Arcade joystick, and any joystick that uses digital inputs. The board comes with a Male DB9 connector that allows an Atari 2600 joystick to be plugged in and used without any custom wiring. For a custom Arcade style joystick it is necessary to wire the joystick to a female DB9 connector using the diagram below.

Joystick A

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
JS1 1InputUpD13 B1P134
JS1 2InputDownD11 B2P132
JS1 3InputLeftD9 B7P127
JS1 4InputRightD8 D0P126
JS1 5InputFire 2D6AL6D4P123
JS1 6InputFire 1D12 B3P133
JS1 7Input5vD10 B0P131
JS1 9InputSelectD7AL7B2P124

Joystick B

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
JS2 1InputUpD31DH3 P84
JS2 2InputDownD29DH4 P87
JS2 3InputLeftD27DH5 P92
JS2 4InputRightD25DH6 P95
JS2 5InputFire 2D23DH7 P98
JS2 6InputFire 1D33DH2 P82
JS2 7Input5vD35DH1 P80
JS2 9InputSelectD37DH0 P78

Classic Computing Shield RS232 UART

The RS232 serial port allows peripherals that need RS232 voltage levels to be connected to the Computing Shield.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
RXInputRS232 ReceiveD0AL0D2P116
TXOutputRS232 SendD1AL1D3P117

Computing Shield Directional Buttons

The Computing Shield has 4 momentary switches arranged in a plus configuration that can be used for user input or video games!

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
UpInputDirectional Button UpD20  P101
DownInputDirectional Button DownD18  P105
LeftInputDirectional Button LeftD17  P111
RightInputDirectional Button RightD21  P100

Computing Shield LEDís

The Computing Shield provides 4 LEDís.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
Led1OutputLed 1D47DL3 P56
Led2OutputLed 2D49DL2 P51
Led3OutputLed 3D51DL1 P48
Led4OutputLed 4D53DL0 P39

Computing Shield Keyboard and Mouse

The Computing Shield has two PS/2 ports that can be used to connect a keyboard and mouse.

NameDirectionFunctionArduino PinPapilio Wing PinATmega32U4 PinSpartan 6 FPGA Pin
PS/2 A CLKOutputClockD5AL5D6P121
PS/2 A DataInputDataD4AL4D7P120
PS/2 B CLKOutputClockD39DL7 P74
PS/2 B DataInputDataD41DL6 P66


Classic Computing Shield High Resolution Image

Click the image to load a High Resolution image of the Classic Computing Shield

Classic Computing Shield Schematic

Click the image to load a PDF version of the Classic Computing Shield Schematic

Papilio DUO Pinouts

Click the image to load a PDF version of Papilio DUO pinouts diagram

Retrieved from
Page last modified on April 01, 2015, at 04:04 PM