Programming Z80 PIO (Bit Controlled mode)

Status
Not open for further replies.

Hammer111

Junior Member level 3
Joined
Jun 14, 2006
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,587
Hi, I've been working on Z80 PIO

First bit must be input bit and rest output bits

this is my code:
Code:
org 0000h
ld a,11001111b   <-- selecting mode
out (12h),a
ld a,10000000b   <-- selecting first bit as input
out (12h),a
ld a,0001000b
out (10h),a         <-- setting output to 0001000
ld a,0
halt

What I get on output is 10001000 regardless if I set first input bit to 1 or 0.
**broken link removed**

What am I doing wrong?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…