Moderadores: 51, guest2003, Renie, gpenga
proex escreveu:Vc esta usando a Standart Periferals LIb da ST?
Que controlador tem esse display?
Eu já fiz isso para o 407, se precisar de ajuda..........
.
/*******************************************************************************
* Function Name : delay_us
* Description :
* Input : - Nus:
* Output : None
* Return : None
* Attention :
*******************************************************************************/
void delay_us(u32 Nus)
{
SysTick_SetReload(delay_fac_us * Nus);
SysTick_CounterCmd(SysTick_Counter_Clear);
SysTick_CounterCmd(SysTick_Counter_Enable);
do
{
Status = SysTick_GetFlagStatus(SysTick_FLAG_COUNT);
}while (Status != SET);
SysTick_CounterCmd(SysTick_Counter_Disable);
SysTick_CounterCmd(SysTick_Counter_Clear);
}
/*******************************************************************************
* Function Name : DelayUS
* Description :
* Input : - cnt:
* Output : None
* Return : None
* Attention : None
*******************************************************************************/
static void DelayUS(vu32 cnt)
{
uint16_t i;
for(i = 0;i<cnt;i++)
{
uint8_t us = 12;
while (us--)
{
;
}
}
}
/*******************************************************************************
* Function Name : DelayMS
* Description :
* Input : - cnt:
* Output : None
* Return : None
* Attention : None
*******************************************************************************/
static void DelayMS(vu32 cnt)
{
uint16_t i;
for(i = 0;i<cnt;i++)
{
uint8_t us = 1000;
while (us--)
{
DelayUS(1);
}
}
}
Voltar para Troca-se/ Procura-se/ Ofertas
Usuários navegando neste fórum: Nenhum usuário registrado e 1 visitante