Author Topic: interrupts external and timer 8051  (Read 2993 times)

0 Members and 1 Guest are viewing this topic.

Offline canatanTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
interrupts external and timer 8051
« on: July 04, 2009, 09:04:58 AM »
hi,
i was wondering if one can use external interrupts and the timer interrupt together... ?? i was trying and it didnt work out .. anyhoo...
do all registers have to be defined in the beginning?? like tcon and tmod??
the timer interrupt is enabled in the beginning
but i want to enable the external interrupt later in the code...
is that possible?
what am i missing here ?
please help.
thankyou

Offline silo_xtreme

  • Robot Overlord
  • ****
  • Posts: 173
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: interrupts external and timer 8051
« Reply #1 on: July 11, 2009, 10:20:32 AM »
Hi canatan,

You should definitely be able to use the interrupts together.

Are you enabling the interrupts globally?

Try using the sei command on an AVR chip.

sei();

Hope this helps,

Mike

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: interrupts external and timer 8051
« Reply #2 on: July 11, 2009, 12:04:09 PM »
Hi canatan,

You should definitely be able to use the interrupts together.

Are you enabling the interrupts globally?

Try using the sei command on an AVR chip.

sei();

Hope this helps,

Mike

He is not using an AVR but an Intel 8051.
Do you have a link to the datasheet? You should be able to do it, but I guess 8051 supports interrupts priorities and this might be tricky.

Chelmi.

 

SMF spam blocked by CleanTalk