mirror of
https://github.com/Derisis13/AT-VFD.git
synced 2025-12-06 19:32:49 +01:00
Feature: explicit function to reset the VFD controller
This commit is contained in:
11
PT6302.c
11
PT6302.c
@@ -28,10 +28,8 @@ inline void PT6302_startup (void)
|
|||||||
DDRC |= RSTpin;
|
DDRC |= RSTpin;
|
||||||
PORTB |= (CSBpin | CLKBpin);
|
PORTB |= (CSBpin | CLKBpin);
|
||||||
PORTB &= ~DINpin;
|
PORTB &= ~DINpin;
|
||||||
PORTC &= ~RSTpin;
|
|
||||||
_delay_us (TPRZ);
|
|
||||||
PORTC |= RSTpin;
|
PORTC |= RSTpin;
|
||||||
_delay_us (TWRSTB);
|
PT6302_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void transmit_bit(const uint8_t data)
|
inline void transmit_bit(const uint8_t data)
|
||||||
@@ -161,3 +159,10 @@ void all_off (void)
|
|||||||
const uint8_t command = 0x71;
|
const uint8_t command = 0x71;
|
||||||
transmit_byte (command);
|
transmit_byte (command);
|
||||||
}
|
}
|
||||||
|
void PT6302_reset (void)
|
||||||
|
{
|
||||||
|
PORTC &= ~RSTpin;
|
||||||
|
_delay_us (TPRZ);
|
||||||
|
PORTC |= RSTpin;
|
||||||
|
_delay_us (TWRSTB);
|
||||||
|
}
|
||||||
|
|||||||
6
PT6302.h
6
PT6302.h
@@ -48,6 +48,12 @@ enum RAM_types{
|
|||||||
* ------------------------------------------------------------- */
|
* ------------------------------------------------------------- */
|
||||||
void PT6302_startup (void);
|
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
|
* Transmits the LSB of data
|
||||||
* Handles communication except CSB
|
* Handles communication except CSB
|
||||||
|
|||||||
Reference in New Issue
Block a user