LPC800-DIP Board开发板上手
这个板子应该好多年前的了,NXP的。荷兰体系的,开发的库函数跟其他欧美的不同,跟日系的也不同。。。如果没用过需要查阅资料适应一下。板子上的资源如下
烧录方式
经过测试使用该软件可以将开发板内出厂自带的固件导出来。
下载地址如下:
https://www.flashmagictool.com/download.html&d=13.45/FlashMagic.exe
基于Keil的开发资源
https://cache.nxp.com.cn/secured/assets/downloads/en/software/LPC834_Example_Code_Bundle_Keil_r1.0.zip?fileExt=.zip&__gda__=1639324431_c0bace2c465b1e0e874c5a716f587bb3
可能不注册账户无法下载,这里提供一下下载链接
这里提供一下我下载的开发资料,经过阅读发现,这两个资料包是两套不同的体系资料,Keil的那个是基于寄存器的。
另外这个是官方的库函数的。比较奇特。感兴趣的大家下载资料慢慢研究吧。我还有点手生。刚做了给简单的LED和串口函数,基于keil那个包里的例子修的。
#include "LPC8xx.h"
//#include <cr_section_macros.h>
#include <stdio.h>
#include "lpc8xx_gpio.h"
#include "lpc8xx_syscon.h"
#include "utilities.h"
extern void setup_debug_uart(void);
static void delay(void)
{
volatile uint32_t cntr= 0x80000;
while(cntr>0)
{
cntr--;
}
}
int main(void)
{
// Configure the debug uart (see Serial.c)
setup_debug_uart();
// Reset the GPIO module and enable its clock. See peripherals_lib
GPIOInit();
// Config. ports (red LED), (blue LED), (green LED) as outputs,
// with LEDs off ('1' = off). See utilities_lib
Config_LEDs(RED | BLUE | GREEN);
while (1)
{
printf("Hello\r\n");
LEDs_On(RED);
delay();
LEDs_Off(RED);
delay();
LEDs_On(BLUE);
delay();
LEDs_Off(BLUE);
delay();
LEDs_On(GREEN);
delay();
LEDs_Off(GREEN);
delay();
}
} // end of main
#define RED (1<<15)
#define BLUE (1<<17)
#define GREEN(1<<16)
#define red_led_port P0_15
#define blue_led_portP0_17
#define green_led_port P0_16
#define TARGET_TX P0_4 // For the MBED serial port
#define TARGET_RX P0_0 // For the MBED serial port 谢谢分享
页:
[1]