AN2343 Freescale Semiconductor / Motorola, AN2343 Datasheet - Page 13

no-image

AN2343

Manufacturer Part Number
AN2343
Description
HC908EY16 LIN Monitor
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
using a two nibble write
*****************************************************************************/
/****************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
*****************************************************************************/
void Clock_Display(void)
{
}
/****************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
*****************************************************************************/
unsigned char Busy_Status(void)
{
}
/****************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
*****************************************************************************/
void Display_Data(unsigned char data, unsigned char regsel)
{
MOTOROLA
EY16PORT.ddrb.byte |= 0x01;
EY16PORT.ptb.byte |= 0x01;
EY16PORT.ptb.byte &= ~(0x01);
unsigned char busy_state;
EY16PORT.ddra.byte &= ~(0x60);
EY16PORT.ddrc.byte &= ~(0x03);
EY16PORT.ptb.byte &= ~(0x04);
EY16PORT.ptb.byte |= 0x02;
EY16PORT.ptb.byte |= 0x01;
busy_state = (EY16PORT.ptc.bit.ptc1 & 0x01);
EY16PORT.ptb.byte &= ~(0x01);
EY16PORT.ptb.byte &= ~(0x02);
Delay(1);
return(busy_state);
EY16PORT.ddrb.byte |= 0x07;
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
Clock_Display
C. Culshaw
06/09/02
None
None
Drive the Display E line high / low to clock data
Busy_Status
C. Culshaw
06/09/02
None
busy_state - if set indicates display busy
Read the busy state of the display and return status to
calling routine.
Bits manipulated one at a time, otherwise display
timing requirements will be violated
Display_Data
C. Culshaw
06/09/02
data - byte to be written to display
regsel -
(0 = Command mode, 1 = data mode)
None
’data’ will be written as two nibbles,
Freescale Semiconductor, Inc.
For More Information On This Product,
used to drive Register Select Line
Go to: www.freescale.com
HC908EY16 LIN Monitor
// Set port B bit 0 (Display E) to O/P
// Display E high
// Display E low
// Set port A bits 5,6 (Display D4 & D5) to I/P
// Set port C bits 0,1 (Display D6 & D7) to I/P
// Display RS low
// Display RW high
// Display E high
// Check display status
// Display E low
// Display RW low
// Set port B bits 0,1,2 (Display RS, R/W, E) to O/P
Appendix B – Source Files
AN2343/D
13

Related parts for AN2343