随笔分类 -  LPC1788开发笔记

摘要:首先是对于端点的数据处理#ifndef __USBEP2_H_#define __USBEP2_H_#include "usb.h"#include "usbhw.h"#include "msc.h"#include "mscuser.h"void usb_ep2_in_process(void);... 阅读全文
posted @ 2015-03-15 17:19 邓小俊 阅读(843) 评论(0) 推荐(0)
摘要:u8 nandflash_write_buffer[NAND_SERECT_FULL_SIZE];static int currentBlock = -1;static int currentPage = -1;//带缓冲的nand读取,不支持跨扇区void NAND_Read_Addr_Mal(u... 阅读全文
posted @ 2015-03-15 17:19 邓小俊 阅读(1349) 评论(0) 推荐(0)
摘要:#ifndef __TIM_H_#define __TIM_H_#include "common.h"extern u8 tim1_mr0_flag;void tim0_ch0_count_int_init(u32 pr,u32 count);//定时器0 通道0 计数模式 中断模式 初始化#end... 阅读全文
posted @ 2015-03-15 17:18 邓小俊 阅读(960) 评论(0) 推荐(0)
摘要:#ifndef __SYS_H_#define __SYS_H_#include "common.h"#define SystemCoreClock 120000000 //cpu时钟频率,计算时有用#define ApbClock 120000000 //120M#define EmcClock ... 阅读全文
posted @ 2015-03-15 17:18 邓小俊 阅读(695) 评论(0) 推荐(0)
摘要:#ifndef __LCD_H_#define __LCD_H_#include "common.h"#include "debugserial.h"#include "delay.h"#include "sdram.h"#define White 0xFFFFFF#define Black 0x0... 阅读全文
posted @ 2015-03-15 17:18 邓小俊 阅读(1387) 评论(0) 推荐(0)
摘要:#include "led.h"void led_init(void){ //p1.14 p0.16 p1.13 p4.27 LPC_SC->PCONP |= (1P1_14 = 0x00;//选择gpio功能,禁止迟滞 不反向 正常推挽 LPC_IOCON->P1_14 |= (2P0_16 = ... 阅读全文
posted @ 2015-03-15 17:18 邓小俊 阅读(709) 评论(0) 推荐(0)
摘要:Sdram型号为hy57v256#ifndef __SRAM_H_#define __SRAM_H_#include "common.h"#include "delay.h"#include "stdlib.h"#include "debugserial.h"#define SDRAM_DEBUG#... 阅读全文
posted @ 2015-03-15 17:17 邓小俊 阅读(756) 评论(0) 推荐(0)
摘要:Lpc1788内置有eeprom使用代码#ifndef __E2PRONINCHIP_H_#define __E2PROMINCHIP_H#include "common.h"#include "sys.h"#include "debugserial.h"#define EEPROM_CLOCK 3... 阅读全文
posted @ 2015-03-15 17:17 邓小俊 阅读(1063) 评论(0) 推荐(0)
摘要:#ifndef __IIC0_H_#define __IIC0_H_#include "common.h"#include "delay.h"//IIC通讯过程中的指定状态#define STATUS_SENDSTART 0X08 //已经发送起始条件#define STATUS_REPEATSTA... 阅读全文
posted @ 2015-03-15 17:17 邓小俊 阅读(653) 评论(0) 推荐(0)
摘要:#ifndef __SPI_H_#define __SPI_H_#include "common.h"#include "delay.h"// cs p1.21//sck p1.20//miso p1.23//mosi p1.24#define SPI_CLOCK 12000000void spi0... 阅读全文
posted @ 2015-03-15 17:16 邓小俊 阅读(1103) 评论(0) 推荐(0)
摘要:首先是gpio中断,这一点和1768不同,1768使用的中断时和eint3共用中断通道,到了1788,专门为gpio开辟了中断#ifndef __JOYPAD_H_#define __JOYPAD_H_#include "sys.h"#include "delay.h"#define JOYPAD_... 阅读全文
posted @ 2015-03-15 02:12 邓小俊 阅读(1447) 评论(0) 推荐(0)
摘要:Norflash型号为sst39vf32#ifndef __NORFLASH_H_#define __NORFLASH_H_#include "common.h"#include "delay.h"#include "debugserial.h"#define NOR_FLASH_BASE 0x80... 阅读全文
posted @ 2015-03-15 02:07 邓小俊 阅读(739) 评论(0) 推荐(0)
摘要:#ifndef __ADC1_H_#define __ADC1_H_#include "common.h"#include "delay.h"void adc_init(u8 ch,u8 div);u16 adc_cover(u8 ch);#endif#include "adc1.h"void ad... 阅读全文
posted @ 2015-03-15 02:06 邓小俊 阅读(877) 评论(0) 推荐(0)
摘要:#ifndef __DEBUGSERIAL_H_#define __DEBUGSERIAL_H_#include "sys.h"#include "stdio.h"extern u8 serialBuffer[256];extern u16 serialStatus;//ڰvoid Debug_Se... 阅读全文
posted @ 2015-03-15 02:05 邓小俊 阅读(1469) 评论(0) 推荐(0)
摘要:#ifndef __MYIIC_H_#define __MYIIC_H_#include "common.h"#include "delay.h"#include "debugserial.h"//sda 027 scl 028//IO方向设置#define IIC1_SDA_IN() P0dir(... 阅读全文
posted @ 2015-03-15 02:04 邓小俊 阅读(693) 评论(0) 推荐(0)
摘要:Lpc1788自带有emc接口用于驱动nandflash,norflash,sdram设备,对于nandflash驱动因为配置简单,时序也简单 首先,针对nandflash而言应当在系统中有三个地址,分别是数据读写地址,命令读写地址以及地址设置地址,这三个地址都需要更具电路图设置,电路图如下根据这张... 阅读全文
posted @ 2014-11-02 15:33 邓小俊 阅读(1684) 评论(0) 推荐(0)