Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help concurrent polling on HC11

Status
Not open for further replies.

windozeuser

Member
I am doing a class project on the HC11 and I need to poll a keypad and the UART which is connected to a wireless receiver. The problem is I need to poll these both pretty much at the same time, how can I do this without having them conflict with each other? I'm not allowed to use interrupts since we didn't learn them in the course.
 
Should not be hard to do. I expect the UART has a bit you can check. You did not say if you were sending data both ways with the UART. I will just show the case for sending the keypad data to the radio.

Code:
repeat
  if(key_pad_pressed)  then
       wait_for_uart_tx_done  // do not overrun the uart tx buffer
       send key
  end_if
// put rx code here if needed
end_repeat
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top