From 141137dfe5bdc7400d5cc1ad388b670f9f2e9446 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 23 Nov 2017 14:34:55 +0100 Subject: update cpld files from VHDL dev machine and delete programmer code (unused) --- sw/z80/tests/pio/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sw/z80/tests/pio') diff --git a/sw/z80/tests/pio/main.c b/sw/z80/tests/pio/main.c index 3687f50..7ac64bc 100644 --- a/sw/z80/tests/pio/main.c +++ b/sw/z80/tests/pio/main.c @@ -3,8 +3,8 @@ #include #define PIO_A_DATA 0x10 -#define PIO_A_CMD 0x11 -#define PIO_B_DATA 0x12 +#define PIO_B_DATA 0x11 +#define PIO_A_CMD 0x12 #define PIO_B_CMD 0x13 void main(void) @@ -14,21 +14,25 @@ void main(void) ld h, #0x00 ;; set bit mode - ld a, #0xCF - ;; load cmd addr ld c, #PIO_B_CMD + + ld a, #0xCF out (c), a - ;; set output + + ;; set all pins to output ld a, #0x00 out (c), a + ;; disable interrupts ld a, #0x0C out (c), a + ;; load data addr ld c, #PIO_B_DATA loop: out (c), h ld a, h + cpl ld h, a jr loop -- cgit v1.2.1