Sunday, August 22, 2010

Aug.22 eCos Interrupts and Motor

Lego FW (in c) and Lejos FW (in c+asm) both have a minimum O/S and set-up interrupts themselves. nxtOSEK uses Lejos drivers in c and interrupt calls in asm.

eCos provides interrupt support calls, so an interrupt call is done by the driver code, but eCos creates/releases and attaches/detaches interrupts.

References:
  • eCos Reference pp.83-88 especially p.84
  • eCos Book -Sec. 3.2.3 pp.64-78  example p.69
  • in eCos code:  i2c_at91sam7sxxx.c (i2c driver) and platform_i2c.c (optional lego HW driver

Tacho Counting via Interrupts:

Ver.1: using Timer TC1: 
  • Interrupt when the motor goes from low to high.
  • Number of interrupts is part of the angle used
Ver. 2: Interrupt when
Topic 2: eCos configuration questions
Tests:
1. An interrupt occurs
2. Get Tacho count

Open Question:
Should both an option using TCxs and not using in them be available?
What needs to be faster Motor Tacho counting or Ultrasound sensor reading (US)?
Can a mixture be used if the # of sensors and motors is known?

No comments:

Post a Comment