Feature: explicit function to reset the VFD controller

This commit is contained in:
2022-03-11 08:36:27 +01:00
parent 51921de344
commit 60476cf7a5
2 changed files with 14 additions and 3 deletions

View File

@@ -28,10 +28,8 @@ inline void PT6302_startup (void)
DDRC |= RSTpin;
PORTB |= (CSBpin | CLKBpin);
PORTB &= ~DINpin;
PORTC &= ~RSTpin;
_delay_us (TPRZ);
PORTC |= RSTpin;
_delay_us (TWRSTB);
PT6302_reset();
}
inline void transmit_bit(const uint8_t data)
@@ -161,3 +159,10 @@ void all_off (void)
const uint8_t command = 0x71;
transmit_byte (command);
}
void PT6302_reset (void)
{
PORTC &= ~RSTpin;
_delay_us (TPRZ);
PORTC |= RSTpin;
_delay_us (TWRSTB);
}

View File

@@ -48,6 +48,12 @@ enum RAM_types{
* ------------------------------------------------------------- */
void PT6302_startup (void);
/* ----------------------------------------------
* Resets the VFD controller trough its reset pin
* Handles reset delays
* ---------------------------------------------- */
inline void PT6302_reset(void);
/* --------------------------------
* Transmits the LSB of data
* Handles communication except CSB