Hello friends, I am new to ARM,and i want to learn how to write driver for a program that too in LPC2378.
void driver() { PINSEL4=0X00000000; PINMODE4=0X00000002; FIO2DIR=0X000000FF; FIO2PIN=0X00000000; RTC_PREINT=0X0000016E; RTC_PREFRAC=0X00006500; PCONP = 0X00000200; RTC_SEC = 0X00000000; RTC_MIN = 0X00000000; RTC_HOUR = 0X00000000; RTC_CCR = 0X00000001;
This is one of the example for Real Time Clock.I want to learn how to configure drivers for any other peripherals like LED,UARTS,etc.I have referred user manual as well as my LPC2378 data sheet but m not able to get the proper idea.
Thanks.
The RTC in the processor do not require any changes to pin modes, directions etc.
By the way: Make sure you look in the user manual and not the datasheet for the processor. The datasheet contains no description of how to use the peripherials. It describes currents, voltages, temperatures, timing etc. It's the user manual that describes registers, configuration bits, operating modes etc.
SO FAR YOU HAVE CLEARED ONE DOUBT REGARDING WHEN TO GO FOR DATASHEET AND WHEN FOR USER MANUAL. SAY IF I WANT TO WRITE DRIVERS FOR LED,AND THAT TOO BLINK LEDs ALTERNATELY WHAT WOULD BE MY FIRST STEP OF GOING THROUGH IN THE USER MANUAL.
THANKS.