I bought a Logomatic V2 (very fine device – well done!) and I want to modify the S/W to make a thing which writes the date and time to a file in SD memory in response to an external hardware interrupt. I got as far as setting the RTC and modifying your Mode 2 program to write the time to the file in response to the timer0 interrupt you guys set up.
Next step is to try to set up an external interrupt. First attempt was to wire up to pins 45 and 46 which are NC on the board and set them up for EINT0 and EINT2 and just have it flash the status light when an edge happens on pin 45 or 46. Result of this is that it works – sort of, when first turned on, but that something is cobbling up the files written to the SD, and after power is cycled it no longer does anything. I then tried programming your P1 line to be EINT3, and get the same weird thing.
Are the EINT0 - EINT3 somehow being used in interfacing to the memory in a way that does not show up in the C code for the Logomatic?
Can you give me any hints in how to set up an external interrupt?
perhaps irrelevant but the older 2106 chips, and maybe 213x too, did not support edge triggered interrupts on EINTx, only level-sensitive. The data sheets are not obvious on this.
stevech,
Thanks for the comment, but it’s pretty clear the LPC2148 is supposed to support edge triggered interrupts on EINTx. Per manual UM10139, EXTMODE 3:0 selects edge (‘1’) or level (‘0’) for EINT3 - EINT0, and EXTPOLAR 3:0 selects rising or high (‘1’) or falling or low (‘0’).
hdheetderks:
stevech,
Thanks for the comment, but it’s pretty clear the LPC2148 is supposed to support edge triggered interrupts on EINTx. Per manual UM10139, EXTMODE 3:0 selects edge (‘1’) or level (‘0’) for EINT3 - EINT0, and EXTPOLAR 3:0 selects rising or high (‘1’) or falling or low (‘0’).
OK. I just wanted to highlight that the docs for the 2106 say the same thing, exactly. But the fine print says prior to rev x chips, the edge functions are not implemented, nor are the registers that choose polarity. I seem to recall it was rev /01 and later. Take a look and see if the same history exists for the 213x.