NXP Semiconductor designed the LPC2400 microcontrollers around a 16-bit/32-bitARM7TDMI-S CPU core with real-time debug interfaces that include both JTAG andembedded Trace. The LPC2400 microcontrollers have 512 kB of on-chip high-speedFlash memory. This Flash memory includes a special 128-bit wide memory interface andaccelerator architecture that enables the CPU to execute sequential instructions fromFlash memory at the maximum 72 MHz system clock rate. This feature is available onlyon the LPC2000 ARM Microcontroller family of products. The LPC2400 can execute both32-bit ARM and 16-bit Thumb instructions. Support for the two Instruction Sets meansEngineers can choose to optimize their application for either performance or code size atthe sub-Routine level. When the core executes instructions in Thumb state it can reducecode size by more than 30 % with only a small loss in performance while executinginstructions in ARM state maximizes core performance.
This firmware translates a PS/2 mouse to a USB mouse. The translator
firmware is entirely interrupt driven (with the exception of sending the
data via USB to the host.) An interrupt is generated when the PS/2 start
bit is received, at which time the firmware will begin its receive Routine.
In addition to this interrupt, every 168ms a timer overflow interrupts the
main program and implements one state of the mouse state machine. This
state machine handles sending bytes to and translating bytes received from
the PS/2 mouse automatically. All of this is done in the background while
the main program runs in the foreground. The only operation that the main
program implements is sending mouse data to the PC via USB.
The module LSQ is for unconstrained linear least-squares fitting. It is
based upon Applied Statistics algorithm AS 274 (see comments at the start
of the module). A planar-rotation algorithm is used to update the QR-
factorization. This makes it suitable for updating regressions as more
data become available. The module contains a test for singularities which
is simpler and quicker than calculating the singular-value decomposition.
An important feature of the algorithm is that it does not square the condition
number. The matrix X X is not formed. Hence it is suitable for ill-
conditioned problems, such as fitting polynomials.
By taking advantage of the MODULE facility, it has been possible to remove
many of the arguments to Routines. Apart from the new function VARPRD,
and a back-substitution Routine BKSUB2 which it calls, the Routines behave
as in AS 274.
This program illustrates how to erase, write, and read FLASH memory from
application code written in C . This Routine exercises the upper 128-
byte FLASH sector.
This will sample all 8 A/D-channels by the continous mode.
Each end of conversion will call an interrupt Routine,
where the AD-channel is put to Port4[2..0]
and the upper nibble of the result is put to Port4[7..4].
Port 4 is connected to the user LEDs of the FlashCan100P Evaluation-Board