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.

serial bus IO on same line

Status
Not open for further replies.

hithesh123

Full Member level 6
Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
Activity points
3,548
Need some help. I am trying to emulate PS2 keyboard protocol.
I am using open-drain pins with external pull ups to drive clock and data lines. Since the ports are open drain, when I write '1', they can become inputs.
I need a way to check when the host(PC) tries to send data to the device(keyboard). The host drives the clk low for ~100usecs, then data low and the clk high.
According to the protocol, the device has to check every 10ms(or lesser) for host request.

I was think of using timer interrupt. It's a bit tricky. I am driving both clock and data lines.
or do I check every time I drive clk high?

The Mcu is c8051F120
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top