Hello All,
I am new to ARM. I am currently using LPC2378 (ARM7TDMI-S) processor on MCB2300 Keil Eval Board. I want to display A/D value on LCD. Kindly guide how to proceed step by step using C language. I don't have any exposure in Assembly language. However I am considerably good at C.
Regards
If you are considerably good at C, the question is: What did you think about the sample code Keil supplies for their own evaluation boards with LPC23xx processors? NXP also have a large code bundle for the processor, even if I don't much like the code quality of it.
The language that you use is irrelevant - the processor neither knows nor cares what language the source code was written in!
The step-by-step procedure for using any of the processor's resources (including the A/D) is defined entirely by the processor hardware and has absolutely nothing to do with the source code language.
Therefore, the documents that you need to study are the manufacturer's hardware manuals for the chip.
You should also check-out the manufacturer's website for application notes, tutorials, etc.
ics.nxp.com/.../lpc23xx
Hi,
Thanks for the earliest response. The problem that I am facing is regarding the code development part. Suppose, I need to glow all the 8 LEDs on the board. Being a beginner, how must I proceed. What are the things that I need to keep in mind.
Again let me also tell you one thing that I successfully ran a code, where I could glow them in various pattern, but that was possible only with the help of my colleague.
Now that I know how to work on LEDs, but when I moved to display A/D values on LCD I am again not able to jot down what are the aspects I need to keep in mind.
Kindly guide in layman terms.
regards
But have you looked at the sample programs? They do make use of the ADC. And they do make use of the display on Keil's evaluation board. The code to blink a LED is the same even when you join in code for reading ADC or presenting information on a LCD.
It's just a question of integrating multiple modules into the same software. The only think to consider is the timing - when to call what function and how long to wait and how the time consumed for one function affects the available time to call other functions.
So what have you done? Have you downloaded the schematics for your board? Have you downloaded the user manual for the processor? Have you looked at the Keil sample code? Have you downloaded and looked at the NXP code bundle? Have you tried to write some own code? Where are you stuck?
actually what I did till date that I went through all the example code, but since those code is generalized, and integrates everything, that hinders the flow of understanding them. Since I am totally new to this field, I am facing a little bit trouble.
Can you suggest some easy mode of understanding the example program, so that I can develop some more complex application like interfacing accelerometer.
This is not a layman's job!
It is beyond the scope of a forum to give you a complete course in embedded software development!
There are some books here: http://www.keil.com but what you really need is a proper taught class.
Maybe your colleague can recommend some local training providers...?
If you are considerable good with C, and able to read the documentation for the processor (the document named User Manual and not the document named Datasheet for this family of NXP processors) then you should be well able to both understand the sample code available and also able to write own code that does write to the peripherial registers, registers interrupt handlers, processes device interrupts etc.
There are lots of code available for how to use an UART. That code would be enough to get serial data from accelerator modules - then you just need to use your C skills to extract the data.
There are code available for accessing the ADC. All you need is to adapt channels and sampling rate. That should be enough for you to pick up data from analog acceleration sensors.
There are code available for emitting information to the LCD module. That code doesn't car what information you send. So your C skills should make it easy for you to change what is displayed - so instead of presenting an ADC value from the potentiometer on the reference board, you could present an ADC value from an accelerometer or a reading picked up from the serial port from an intelligent accelerometer module.
So once more: What work have you done yourself, and exactly where are you stuck? You just have to realize that this is work you have to do yourself. No other person will try to combine all code for the different peripherials into a working program.
You really have to work, and get back with specific problems where you have got stuck.
Hello Ranjeet Sinha,
Please check example .\Keil\ARM\Boards\Keil\MCB2300\Blinky.
This example outputs the AD value from the potentiometer to the serial port and displays a bargraph representing the AD value on the LCD.
Best Regards, Martin Guenther
http://www.keil.com/support/man/docs/gsac/ http://www.keil.com/support/man/docs/uv4/uv4_examples.htm
Of course, these assume that you are basically a competent embedded developer - it really isn't the place of tool manuals to teach you how to program!
what is the meaning of FIOxMASK. In the case of "Blinky" example, there is written a code as follows:
FIO2DIR = 0x000000FF; /* P2.0..7 defined as Outputs */ FIO2MASK = 0x00000000;
What is the purpose of writing FIOxMASK here. What it exactly do?
The purpose is exactly as it is described in the user manual of the processor - to control which I/O pins that will be affected when you make 8-bit, 16-bit or 32-bit assigns to the port. This allows you to set/clear multiple bits with a single assign, without needing to perform a read/modify/write with and/or logic.
I didn't get you. Neither I could get it clear from user manual also.
Did you try to use google translate?
What do you mean?