cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to make a PIA tester with a STM32F103

Elektraglide
Associate III

I'm building a little tester for 6821 PIA using a STM32F103.

I need to be able to write to the data bus of the PIA, and also read from it.  (6821 has 4 registers that are addressed using 2-bits input RS0,RS1).

So 8 GPIO pins for the databus.  And I use 3 more GPIO pins for RS0,RS1 and R/W pin.

For writing to the PIA:
I set the GPIO pins to output,  set the output pins actual data and then make R/W low for writing.

For read from the PIA:
I set the GPIO pins to input,  make R/W high for reading and then read the input pins..


Does that sound right?   I'm concerned about the timing between the GPIO data bus pins switching from output to input (and back)  and then toggling the R/W line to the PIA. 

Is all this switching even needed?  


20 REPLIES 20
rottenpotato
Associate

Did you ever complete this project?  I have a pile of suspect PIAs on my workbench from pinball PCB repairs that need to be validated or tossed... and a some ST dev boards that need a project.