-
谢谢楼主分享!
-
还不会弄3D,学习下看怎么弄
-
这要liscence不
-
本帖最后由 木瓜子 于 2016-11-8 17:02 编辑
不知道你们都用得哪个版本的IAR,我下载了IAR for R78 v2.21,用网上的V2.20 破解,看来是可以破解了,但是不完全破解的,因为RL78的库文件无法提取出来,同时也无法用E1进行仿真,以仿真就跟死机一样不动。
CS+的缺点很明显,就是C潜入汇编后无法优化,不像IAR可以提供C语言的获取状态寄存器。而且CS+ 开了最高优化等级后代码优化效果还是不理想。
代码生成可以使用APP3,这样IAR就可以用了
-
学习下,好东西不容错过
-
学习下,很需要呢,谢谢分享
-
终于找到原因了,我这左边的 picture 是默认打勾的,去掉就得到跟版主一样的结果了。谢谢版主!
-
谢谢分享了,菜鸟学习中
-
确实是上面没说复制。是先选中并复制,然后再选择Smart Paste的相应功能,结果就能出来了。不过我有个地方疑惑,比如要对端口使用Smart Paste的 Ports + Wires + NetLables功能,出来这样的结果多出来了左边部分,不知道你们的实际操作结果也是这样的吗
-
altium designer sumer 09按着LZ的步骤去做,最后一步OK后出来的不是预期的结果,而是元件,比如出来的是你上面的那个ADC芯片元件,端口+线+网络标号就没看见。这是什么情况啊,难道是因为破解版的原因?
-
本帖最后由 木瓜子 于 2015-11-24 18:53 编辑
#define "r_cg_macrodriver.h"
#pragma interrupt INTIICA0 IICA_IRQHandler
typedef enum
{
WRITE_CMD_TYPE,
READ_CMD_TYPE
}IICA_CMD_TYPE;
typedef enum
[
IICA_IDLE_STATE,
IICA_SEND_SLAVE_ADDR_STATE,
IICA_SEND_DATA_ADDR_STATE,
IICA_RECEIVE_DATA_STATE,
IICA_STOP_STATE
}IICA_STATE;
typedef struct
{
IICA_STATE state;
IICA_CMD_TYPE cmdType;
uint8_t slaveAddr;
uint8_t dataAddr;
uint8_t *pbuffer;
uint16_t number;
}IICA_PARA;
volatile IICA_PARA IICA_Para;
void IICA_MasterComunicate(IICA_CMD_TYPE cmd, uint8_t slaveAddr, uint8_t dataAddr, uint8_t *pbuffer, uint16_t number)
{
uint8_t wait = 0x1F;
if (number == 0)
{
return;
}
IICA_Para.cmdType = cmd;
IICA_Para.slaveAddr = slaveAddr;
IICA_Para.dataAddr = dataAddr;
IICA_Para.pbuffer = pbuffer;
IICA_Para.number = number;
IICA_Para.state = IICA_SEND_SLAVE_ADDR_STATE;
STT0 = 1U; /* set IICA0 start condition */
IICAMK0 = 0U; /* enable INTIIA0 interrupt */
while (wait--);
IICA0 = slaveAddr; // the command is Write command for the slave address sending
}
static void __interrupt IICA_IRQHandler(void)
{
if (IICA_Para.cmdType == WRITE_CMD_TYPE)
{
IICA_MasterWrite();
}
else
{
IICA_MasterRead();
}
}
static void IICA_MasterRead(void)
{
uint8_t wait = 0x0F;
if ((1 == TRC0) && (0 == ACKD0)))
{
/* error occur, add your own code here */
IICA_Para.state = IICA_IDLE_STATE;
}
switch(IICA_Para.state)
{
case IICA_SEND_SLAVE_ADDR_STATE:
IICA0 = IICA_Para.dataAddr;
IICA_Para.state = IICA_SEND_DATA_ADDR_STATE;
break;
case IICA_SEND_DATA_ADDR_STATE:
STT0 = 1; //generate the start condition again
while (wait--); //wait a short time for the generation of start condition
IICA0 = IICA_Para.slaveAddr | 0x01;
WTIM0 = 0; //the master will genterate the interrupt at the falling edge of eighth clock
ACKE0 = 1 //enable to send ACK
IICA_Para.state = IICA_RECIEVE_DATA_STATE;
break;
case IICA_RECEIVE_DATA_STATE:
*IICA_Para.pbuffer++ = IICA0;
if (--IICA_Para.number == 0)
{
ACKE0 = 0; //the last data send the NACK. Note that the ackownlege signal is not sent untile the SCL line is released
WTIM0 = 1; //master will generate interrupt at the falling edge of the ninth clock pulse
IICA_Para.state = IICA_STOP_STATE;
} //at this time when receiving the last data, the ackownlege singal is not sent from master
WREL0 = 1; //release the SCL; Note that the master will pull down the clock after entering ingterrupt
break;
case IICA_STOP_STATE:
SPT0 = 1; IICA_Para.state = IICA_IDLE_STATE;
break;
}
}
只提供不完整的,
-
挺好的,学习下如何应用
-
这个很不错,看得出整理也话费了一番功夫,谢谢LZ分享
-
学习学习,谢谢分享
-
我会试试看的,谢谢斑竹的指教
-
好,我找下你说的那两个版本,仔细看下,我看的时候是一点一点仔细看,想明白了才往下看,所以总是被卡住:faint:
-
还有不对劲的啊, 我怎么觉得是应该第一句去掉的,看着这个函数的本意似乎是,如果被传递的函数指针不为空,且参数所指的函数指针也不为空,就将被传递的函数指针赋值给参数所指的指针
void uSCore_Initial(uSCoreFunc *pFuns)
{
uSCoreFunc_Initial(&uSCoreInit);
if( (uSCoreInit.TimerIsrContainer != NULL) && (pFuns->TimerIsrContainer != NULL) )
pFuns->TimerIsrContainer = uSCoreInit.TimerIsrContainer;
}
也就是应该是
void uSCore_Initial(uSCoreFunc *pFuns)
{
if( (uSCoreInit.TimerIsrContainer != NULL) && (pFuns->TimerIsrContainer != NULL) )
pFuns->TimerIsrContainer = uSCoreInit.TimerIsrContainer;
}
不知道我说的对不对
-
typedef struct
{
void (*TimerIsrContainer)(void);
}uSCoreFunc;
这是定义的结构体,里面只一个函数指针成员,但我不知道下面的这个函数,其参数怎么会出现了另一个成员Led_4_Test ?
void uSCoreFunc_Initial(uSCoreFunc *Str)
{
Str->TimerIsrContainer = NULL;
Str->Led_4_Test = NULL;
}
话说怎会这么少人关注啊,我是才开始发现版主发的这个系列us成长,就关注起来,俺一个菜鸟,多学习一些前辈高手的编程思想
[ 本帖最后由 木瓜子 于 2013-8-28 23:11 编辑 ]
-
void uSCore_Initial(uSCoreFunc *pFuns)
{
uSCoreFunc_Initial(&uSCoreInit);
if( (uSCoreInit.TimerIsrContainer != NULL) && (pFuns->TimerIsrContainer != NULL) )
pFuns->TimerIsrContainer = uSCoreInit.TimerIsrContainer;
}
不知道这里的if 语句还有什么作用,第一行就已经
uSCoreInit.TimerIsrContainer = NULL,
那if根本就没起作用啊,不理解啊不理解
话说开头看就优点被绕晕的感觉,菜鸟就是这样了,什么时候才能得到这高度啊:faint:
-
很不错,拿来学习了,谢谢LZ