Jul 22, 2011 #1 L liuyying Member level 4 Joined Oct 31, 2010 Messages 68 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Location come from malaysia, which is a special country oo. Activity points 1,709 How to define port in LPC2148???
Jul 22, 2011 #2 bigdogguru Administrator Joined Mar 12, 2010 Messages 9,821 Helped 2,350 Reputation 4,694 Reaction score 2,272 Trophy points 1,413 Location Southwest, USA Activity points 62,383 Could you be a little more specific, define the port as....? What compiler are you using? For Keil the following may contain: LPC214x User Manual
Could you be a little more specific, define the port as....? What compiler are you using? For Keil the following may contain: LPC214x User Manual
Jul 22, 2011 #3 L liuyying Member level 4 Joined Oct 31, 2010 Messages 68 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Location come from malaysia, which is a special country oo. Activity points 1,709 bigdogguru said: Could you be a little more specific, define the port as....? What compiler are you using? For Keil the following may contain: LPC214x User Manual Click to expand... u mean which language i use?? i use c programming... As i know, i can define pic directly like PORTA=CAR. Is i define lpc as the same way??
bigdogguru said: Could you be a little more specific, define the port as....? What compiler are you using? For Keil the following may contain: LPC214x User Manual Click to expand... u mean which language i use?? i use c programming... As i know, i can define pic directly like PORTA=CAR. Is i define lpc as the same way??
Jul 22, 2011 #4 bigdogguru Administrator Joined Mar 12, 2010 Messages 9,821 Helped 2,350 Reputation 4,694 Reaction score 2,272 Trophy points 1,413 Location Southwest, USA Activity points 62,383 liuyying said: u mean which language i use?? i use c programming... As i know, i can define pic directly like PORTA=CAR. Is i define lpc as the same way?? Click to expand... I was actually referring to the C compiler company, Keil, IAR, GCC, etc. But yes, assigning a port a value would be similar to the procedure used with a PIC. The actual C compiler and the associated header file would dictate the naming convention for the port. Does this info help answer your question? BigDog
liuyying said: u mean which language i use?? i use c programming... As i know, i can define pic directly like PORTA=CAR. Is i define lpc as the same way?? Click to expand... I was actually referring to the C compiler company, Keil, IAR, GCC, etc. But yes, assigning a port a value would be similar to the procedure used with a PIC. The actual C compiler and the associated header file would dictate the naming convention for the port. Does this info help answer your question? BigDog
Jul 22, 2011 #5 L liuyying Member level 4 Joined Oct 31, 2010 Messages 68 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Location come from malaysia, which is a special country oo. Activity points 1,709 bigdogguru said: I was actually referring to the C compiler company, Keil, IAR, GCC, etc. But yes, assigning a port a value would be similar to the procedure used with a PIC. The actual C compiler and the associated header file would dictate the naming convention for the port. Does this info help answer your question? BigDog Click to expand... Ehm..... still do not have idea on defining the port in lpc.. Can give me some example???
bigdogguru said: I was actually referring to the C compiler company, Keil, IAR, GCC, etc. But yes, assigning a port a value would be similar to the procedure used with a PIC. The actual C compiler and the associated header file would dictate the naming convention for the port. Does this info help answer your question? BigDog Click to expand... Ehm..... still do not have idea on defining the port in lpc.. Can give me some example???
Jul 22, 2011 #6 bigdogguru Administrator Joined Mar 12, 2010 Messages 9,821 Helped 2,350 Reputation 4,694 Reaction score 2,272 Trophy points 1,413 Location Southwest, USA Activity points 62,383 As I indicated before, the #defines, port names, etc are compiler specific. However here is an example using the Keil C compiler to flash a LED using a timer: Problem with delay timing with LPC2148 Simple LED Blink Program using WINARM Compiler: First LPC2148 ARM7 microcontroller test led blink Other examples and appnotes for the LPC2148 Keil's NXP (founded by Philips) LPC2148 Device Page Unless you indicate the exact C compiler you are using, this is the best I can do as far as example programs. BigDog
As I indicated before, the #defines, port names, etc are compiler specific. However here is an example using the Keil C compiler to flash a LED using a timer: Problem with delay timing with LPC2148 Simple LED Blink Program using WINARM Compiler: First LPC2148 ARM7 microcontroller test led blink Other examples and appnotes for the LPC2148 Keil's NXP (founded by Philips) LPC2148 Device Page Unless you indicate the exact C compiler you are using, this is the best I can do as far as example programs. BigDog