I have updated my
Composite Text Video display to a newer AVR. The benefit is that it is fully functional using a single chip + oscillator.
It also uses an SPI input which can be driven directly from a 6522's Serial shift register (CB1 & CB2). A handshake line is connected to PB7. Maximum SCK speed is 4MHz. To support the 6522, I use SPI Mode 3 with MSB first.
NTSC and PAL are still supported as are several options for fonts - Old DOS, C-64, Pet, and Apple2 fonts are available.
Here's the schematic:
Attachment:
File comment: Schematic
Vid2c.jpg [ 86.15 KiB | Viewed 7330 times ]
The 6502 display driver looks like this:
Code:
;
; 6522 Definitions
;
Vportb = $0280 ; VIA1 Port B
Vddrb = $0282 ; VIA1 Port B DDR
Vsr = $028A ; VIA1 Shift Register
Vacr = $028B ; VIA1 ACR
Vifr = $028D ; Via1 IFR bit 1
Vier = $028E ; Via1 IER
;----------------------------------------------------------------------
; Output contents of A to the Video Display
; A is preserved, Flags are changed.
;----------------------------------------------------------------------
VOutput
bit vportb ; read handshake byte (pb7)
bmi Voutput ; if pb7=1, wait for AVR to be ready
sta vsr ; send to display via serial port
VOutput1
bit vportb ; read handshake byte
bpl Voutput1 ; if pb7=0, wait for AVR to ack
rts
;----------------------------------------------------------------------
; Call this once to initialize the interface
; it sets up Port B, pin 7 and CB1/CB2 for serial mode
; A is changed and Flags are changed.
;----------------------------------------------------------------------
VInitDisp
sei ; disable interrupts
lda Vddrb ; get ddr b
and #$7F ; force bit 7=0
sta vddrb ; set bit 7 to input
lda vacr ; get ACR contents
and #$E3 ; mask bits 2,3,4
ora #$18 ; set Shift out under control of PHI2 mode
sta vacr ; store to acr
lda #$04 ; shift register flag in IER
sta vier ; disable shift register interrupts
cli ; Enable Interrupts again
rts ; done
I can provide pre-programmed AVR's to anyone interested in adding this to their projects.
Daryl
_________________
Please visit my website ->
https://sbc.rictor.org/