|
技术交流 | 电路欣赏 | 工控天地 | 数字广电 | 通信技术 | 电源技术 | 测控之家 | EMC技术 | ARM技术 | EDA技术 | PCB技术 | 嵌入式系统 驱动编程 | 集成电路 | 器件替换 | 模拟技术 | 新手园地 | 单 片 机 | DSP技术 | MCU技术 | IC 设计 | IC 产业 | CAN-bus/DeviceNe |
请问如果要用at90s8515代替8051,需要注意什么 |
作者:davidjiang 栏目:单片机 |
现在我想把DS2155 START KIT中的8051改为90S8515,复位电路已改。但是我用ICE200仿真时,无法读写DS2155中的头十六位REGISTERS.用AVR STUDIO 4 的SIMULATION证明程序是好的。可以写读0X0260,不知道还需要改一些什么才可以。另外我在考虑是否和速度有关,各位如果有时间希望给个建议。 DS2155的地址MAP:0000-0FFF. #ifndef _NEC_2155_H_ #define _NEC_2155_H_ //--------------- external SRAM -------------- #define MSTRREG 0x0 #define IIR1 0x14 #define IIR2 0x15 #define T1RCR1 0x03 #define T1RCR2 0x04 #define T1TCR1 0x05 #define T1TCR2 0x06 #define T1CCR1 0x07 #define T1RDMR1 0x0C #define T1RDMR2 0x0D #define T1RDMR3 0x0E #define INF01 0x10 #define _TS1 0x50 #define _RS1 0x60 #define _SR1 0x16 #define _SR2 0x18 #define IMP2 0x19 //---------------- internal SRAM -------------- #define IBUF 0x60 #define RBUF 0x68 //---------------- define PORTB pin ----------- #define POWER 0 #define ACTIVE 1 #define SYNC 3 #define EXTINT1 6 #define OFFHKCH1 7 //--------------- define const VALUE --------- #define RESET 0 #define ENABLE 1 #define DISENABLE 0 #define LED_ON 1 #define LED_OFF 0 #define SET_INPUT 0x00 #define SET_OUTPUT 0xff #define INIT_PORTD_DIR 0xc4 //#define SoftReset() (((void(*)(void))(CHAR *)0x0000)()) /* soft reset for the cpu*/ //------------- define GLOBAL variable ------- uint8_t tout=0; //------------- declare functions ------------ void T1_INIT(void); void T1_TS_REG_12_INIT(void); /*====================================== 8M Delay = 0.125 *((tt*4-1)+9) =0.5tt + 1 (us) __asm__("jiangtao: subi R16" // 1t " nop" // 1t " brne jiangtao" // 2t/1t " nop" // 1t " ret"); // 4t ======================================*/ static void delay(unsigned LONG t) { __asm__ volatile( "L_%=: \n\t" \ "dec R25 \n\t" \ "nop \n\t" \ "brne L_%= \n\t" \ "nop \n\t" \ "ret \n\t" \ : \ : "r" (t) \ ); \ } //*************before main function initialize ------- //void my_init (void) __attribute__ ((naked)) \ // __attribute__ ((section (".init1"))); //------------- define DS2155 configuration register table ------- unsigned CHAR InitTable[]={ 0x00,0x00, /* MSTRREG */ 0x01,0x80, /* IOCR1 */ 0x02,0x00, /* IOCR2 */ 0x03,0x0c, /* T1RCR1 */ 0x04,0x64, /* T1RCR2 */ 0x05,0x30, /* T1TCR1 */ 0x06,0x80, /* T1TCR2 */ &nbs |
2楼: | >>参与讨论 |
作者: davidjiang 于 2003/6/13 9:58:00 发布:
nobody can help me? |
3楼: | >>参与讨论 |
作者: zsmbj 于 2003/6/13 10:05:00 发布:
注意:8515的外部地址从0x260开始。 |
4楼: | >>参与讨论 |
作者: davidjiang 于 2003/6/13 10:23:00 发布:
程序里是从0x260开始的,woyong |
5楼: | >>参与讨论 |
作者: davidjiang 于 2003/6/13 10:25:00 发布:
程序里是从0x260开始的,我用ramend+1既是0x260 |
6楼: | >>参与讨论 |
作者: davidjiang 于 2003/6/13 11:50:00 发布:
I check the website, I know the reason. Hi Guy, I check the website, I know the reason. Author: sellis (Sean Ellis) ( sellis@superscape.com) Date: Mar 11 02, 10:01 If you have external RAM mapped from 0x0000 to 0x7FFF, then the addresses 0x0000 - 0x025F would never be accessed externally since they are the internal RAM locations. Sean. |
7楼: | >>参与讨论 |
作者: weihua 于 2003/6/13 15:59:00 发布:
注意8051,7,8块,8515,20多块 |
8楼: | >>参与讨论 |
作者: 双龙老耿 于 2003/6/15 18:24:00 发布:
8051你单独好用吗?8051是掩模的,卖了也只能当8031用! http://www.sl.com.cn |
|
|
免费注册为维库电子开发网会员,参与电子工程师社区讨论,点此进入 |
Copyright © 1998-2006 www.dzsc.com 浙ICP证030469号 |