Thursday, March 31, 2011

LPC2368 ทดสอบ Timer0 Interrupt

images by free.in.th
Thanks: ฝากรูป


/****************************************************/
/* Examples Program For "CP-JR ARM7 LPC2368" */
/* Target MCU : Philips ARM7-LPC2368 */
/* : X-TAL : 12.00 MHz */
/* : PLL Setup = MSEL(12),NSEL(1) */
/* Keil Editor : uVision3 V4.13a */
/* Compiler : Keil Realview MDK V4.13 */
/* Create By : Musa */
/* Last Update : 30/March/2011 */
/* Function : TimerInterrupt.c/TimerInterrupt.hex */
/****************************************************/
#include "LPC23xx.H"

Wednesday, March 30, 2011

LPC2368_I2C_Interface



/****************************************************/
/* Examples Program For "CP-JR ARM7 LPC2368" */
/* Target MCU : Philips ARM7-LPC2368 */
/* : X-TAL : 12.00 MHz */
/* : PLL Setup = MSEL(12),NSEL(1) */
/* : CCLK = 4, USB = 2, PLCK0,1 = cclk/4*/
/* : SYSTEMcclk = 72MHz, USB = 36MHz */
/* : PLCK = 18MHz */
/* Keil Editor : uVision4 V4.14 */
/* Compiler : Keil Realview MDK V3.20 */
/* Create By : MAN */
/* Last Update : 30/March/2011 */
/* Function : Example Use I2C0 Interface 24LCxx */
/* : EEPROM in Master Mode */
/****************************************************/
/***** Header File *****/
#include < LPC23xx.H > // Header File LPC2368
#include < stdio.h > // Use sprintf

Tuesday, March 29, 2011

Testing ADC LPC2368 Keil complier




Sunday, March 27, 2011

LPC2368_SPI_Interface


/**********************************************************/
/* Examples Program For "CP-JR ARM7 LPC2368" */
/* Target MCU : Philips ARM7-LPC2368 */
/* : X-TAL : 12.00 MHz */
/* : PLL Setup = MSEL(12),NSEL(1) */
/* : CCLK = 4, USB = 6, PLCK0,1 = cclk/4 */
/* : SYSTEMcclk = 72MHz, USB = 48MHz */
/* : PLCK = 18MHz */
/* Keil Editor : uVision4 V4.14 */
/* Compiler : Keil Realview MDK V3.20 */
/* Create By : MAN */
/* Last Update : 9/March/2011 */
/* Function : Example Use SPI Interface MCP3202 */
/* : and MCP4821 */
/**********************************************************/

#include < LPC23xx.H > // LPC2368 MCU Register
#include < stdio.h > // For Used Function printf

Saturday, March 26, 2011

LPC2368 การดักจับสัญญาณ Interrupt และการกระโดดไปยัง routine ของ ARM7 Realview-Compiler

void sio_irq (void) __irq
{
  /* ใส่โค้ดที่ต้องการให้ทำงานเมื่อเกิด Interrupt */


T0IR = 0x00000001; //clear the interrupt flag
         // *The interrupt flag must be cleared to reset- 
                                                       //interruption. 

VICVectAddr=0;                                          //Acknowledge interrupt
}


Example ARM programing with Realview Compiler

http://www.keil.com/download/list/arm.htm