Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top