The little adaptor board is intended to:
- supply the the XE164 KeyChain providing 5V (I just use an old fashion 7805 linear voltage regulator)
- be the interface board connecting the display to the XE164
- be the interface board for speed sensors (electronics not yet soldered)
- be the interface board for Oil Temperature sensor (I use the one already available on the YAMAHA R6, so I just need to protect the XE164 and convert the signal with the ADC) - be the interface board for fuel level signal
- be the interface board for any forther expansion (feel free to post ideas...).
At the end, this is the video of the first power-on:
where I have created a demo project where the weels and engine speed are generated by the SW itself, this permit to observe all the Display Messages (real debug will come once the weeling speed sensors will be connected). Anyhow, the first bug has been discovered: the Display refresh speed is too slow !!!
To fix it I had to reload Timer_4 counter to the 480Hz value after each Interrupt Service occours:
//****************************************************************************
// @Function void GPT1_viTmr4(void)
//
//----------------------------------------------------------------------------
// @Description This is the interrupt service routine for the GPT1 timer 4.
// It is called up in the case of over or underflow of the
// timer 4 register.
// If the incremental interface mode is selected and the
// interrupt for this mode is not disabled it is called up if
// count edge or count direction was detected.
//
// Please note that you have to add application specific code
// to this function.
//
//----------------------------------------------------------------------------
// @Returnvalue None
//
//----------------------------------------------------------------------------
// @Parameters None
//
//----------------------------------------------------------------------------
// @Date 3/1/2009
//
//****************************************************************************
void GPT1_viTmr4(void) interrupt T4INT
{
// Stop Timer first !
GPT1_vStopTmr(GPT1_TIMER_4);
if ( ucDisplayDigit[ucIdx] != 0xFF )
{
SelectDigit ( 0 ); // Deselect any DIGIT
Display ( ucDisplayDigit[ucIdx] );
// DOT driver
if ( ucDisplayDigit[ucIdx]>>4 )
IO_vSetPin ( IO_P0_6 );
else
IO_vResetPin ( IO_P0_6 );
SelectDigit ( ucIdx );
}
ucIdx++;
if ( ucIdx > 5 ) ucIdx = 0;
// Start Timer
GPT12E_T4 = TIMER4_480Hz;
GPT1_vStartTmr(GPT1_TIMER_4);
} // End of function GPT1_viTmr4
... now, beliewe me, the refresh speed is as expected and the digits are really bright and stable.
No comments:
Post a Comment