![]() |
McMajan Library Pack
v 2.00
Improve your Arduino !
|
#include <Ss_hc595.h>
Public Member Functions | |
hc595 (uint8_t, uint8_t, uint8_t, uint8_t) | |
costructor More... | |
void | PulseE (uint8_t) |
internal function, don't use direcly More... | |
void | Send595 (void) |
It sends the internal buffer to the shift register chain. This produce a update of all outputs of all shift registers. More... | |
void | Set595Pin (bool, bool, bool, bool, bool, bool, bool, bool, uint8_t) |
Using this function you can set every bit of the buffer of a single 74HC595 internal buffer using single bits. More... | |
void | Set595Pin (uint8_t, uint8_t) |
set internal buffer of single 74hc595 (without update the real chip status but only internal buffer More... | |
void | Send595Pin (uint8_t, uint8_t) |
It works as the sum of Set595Pin and the Send595, in the sense that sets the 8-bit and sends them directly to the shift register. If you have only one shift register to edit you should use this function. If you need to change more than one at the same time you should use two or more Set595 and eventually Send595 at the end. More... | |
void | SetLcdPin (bool, bool, bool, bool, uint8_t) |
void | DisplayReset (uint8_t, uint8_t) |
Reset of the display. More... | |
void | DisplayWrite (const char *, uint8_t) |
Write a string on the specificated display starting from actual position. More... | |
void | DisplayChar (uint8_t, uint8_t) |
Write a single char on the specificated display starting from actual position. More... | |
void | CreateChar (uint8_t, uint8_t[], uint8_t) |
Used to redefine some custom characters. The char is the number of the character to redefine (0-7). Array is a 8bytes array with the bitmap of new character. sr is the number of the shift register. More... | |
void | SetLcdRS (bool, uint8_t) |
void | SetHLcd (uint8_t, uint8_t) |
void | SetLLcd (uint8_t, uint8_t) |
void | SendLcdCommand (uint8_t, uint8_t) |
This function is useful to send directly some commands to the display. val This is the option parameter which is a char in which every bit will be sent to the display. There are some pre-set: LCD595_DISPLAY_ON_CB: Switch on the display with blinking cursor on. LCD595_DISPLAY_ON_C: Switch on the display with NOT blinking cursor. LCD595_DISPLAY_ON_B: Switch on the display with last char blinking. LCD595_DISPLAY_ON: Switch on display without cursor. LCD595_DISPLAY_OFF: Switch off the display LCD595_DISPLAY_CLEAR: Cleans the display. More... | |
void | SetCursor (uint8_t, uint8_t, uint8_t, uint8_t) |
move virtual cursor to x,y position More... | |
void | SetDDRAM_Address (uint8_t, uint8_t) |
void | Lcd_SetFreePin (uint8_t, bool, uint8_t) |
Sets the free pins (2 and 0) of 74HC595 connected to a display. ,. More... | |
void | DirectdigitalWrite (uint8_t, uint8_t *, uint8_t) |
Public Attributes | |
uint8_t * | Buffer |
uint8_t | num_595 |
Definition at line 42 of file Ss_hc595.h.
hc595 | ( | uint8_t | latch, |
uint8_t | clock, | ||
uint8_t | data, | ||
uint8_t | num | ||
) |
costructor
latch | ST (pin 12 of 74HC595) - Latch - Storage register clock |
clock | SH (pin 11 of 74HC595) - Shift register clock |
data | DS (pin 14 of 74HC595) - Serial Data input |
Definition at line 10 of file Ss_hc595.cpp.
void CreateChar | ( | uint8_t | address, |
uint8_t | map[], | ||
uint8_t | display | ||
) |
Used to redefine some custom characters. The char is the number of the character to redefine (0-7). Array is a 8bytes array with the bitmap of new character. sr is the number of the shift register.
address is the char you want to change (0-7) map is the buffer
display | is the number of register in the chain |
Definition at line 244 of file Ss_hc595.cpp.
|
inline |
void DisplayChar | ( | uint8_t | buff, |
uint8_t | display | ||
) |
Write a single char on the specificated display starting from actual position.
buff | is the char to write display is the shift register number in the chain. |
Definition at line 183 of file Ss_hc595.cpp.
void DisplayReset | ( | uint8_t | options, |
uint8_t | num | ||
) |
Reset of the display.
options | You can combite (with |) more of this: LCD595_BASIC_DISPLAY_INIT: standard reset LCD595_USEFONT_5X10: use the 5x10 font instead the 5x8 LCD595_MORELINES: use displays with more than one line. If you leave a null value, the standard option is: LCD595_BASIC_DISPLAY_INIT | LCD595_USEFONT_5X10 | LCD595_MORELINES num is the number of shift register in the chain |
Definition at line 143 of file Ss_hc595.cpp.
void DisplayWrite | ( | const char * | buff, |
uint8_t | display | ||
) |
Write a string on the specificated display starting from actual position.
buff | is the buffer to write (null terminated!) display is the shift register number in the chain. |
Definition at line 173 of file Ss_hc595.cpp.
void Lcd_SetFreePin | ( | uint8_t | pin, |
bool | status, | ||
uint8_t | sr | ||
) |
Sets the free pins (2 and 0) of 74HC595 connected to a display. ,.
pin | is the pin (0 or 2) status is the state (HIGH o LOW) |
sr | and sr is the shift register number (from 0). |
Definition at line 130 of file Ss_hc595.cpp.
References Send595().
void PulseE | ( | uint8_t | num | ) |
internal function, don't use direcly
Definition at line 42 of file Ss_hc595.cpp.
References Send595().
void Send595 | ( | void | ) |
It sends the internal buffer to the shift register chain. This produce a update of all outputs of all shift registers.
Definition at line 59 of file Ss_hc595.cpp.
void Send595Pin | ( | uint8_t | val, |
uint8_t | display | ||
) |
It works as the sum of Set595Pin and the Send595, in the sense that sets the 8-bit and sends them directly to the shift register. If you have only one shift register to edit you should use this function. If you need to change more than one at the same time you should use two or more Set595 and eventually Send595 at the end.
val | is the 8 bit buffer to fill relative 74HC595 |
display | is the number of shift register on the chain (0 is the first!). |
Definition at line 103 of file Ss_hc595.cpp.
References Send595().
void SendLcdCommand | ( | uint8_t | val, |
uint8_t | display | ||
) |
This function is useful to send directly some commands to the display. val This is the option parameter which is a char in which every bit will be sent to the display. There are some pre-set:
LCD595_DISPLAY_ON_CB: Switch on the display with blinking cursor on.
LCD595_DISPLAY_ON_C: Switch on the display with NOT blinking cursor.
LCD595_DISPLAY_ON_B: Switch on the display with last char blinking.
LCD595_DISPLAY_ON: Switch on display without cursor.
LCD595_DISPLAY_OFF: Switch off the display
LCD595_DISPLAY_CLEAR: Cleans the display.
display is the shift register number on the chain
Definition at line 276 of file Ss_hc595.cpp.
void Set595Pin | ( | bool | D7, |
bool | D6, | ||
bool | D5, | ||
bool | D4, | ||
bool | D3, | ||
bool | D2, | ||
bool | D1, | ||
bool | D0, | ||
uint8_t | num | ||
) |
Using this function you can set every bit of the buffer of a single 74HC595 internal buffer using single bits.
D7-0 | are single true or false values of single bits |
num | is the number of shift register in the chain. |
Definition at line 113 of file Ss_hc595.cpp.
void Set595Pin | ( | uint8_t | val, |
uint8_t | num | ||
) |
set internal buffer of single 74hc595 (without update the real chip status but only internal buffer
val | is the 8 bit buffer to fill relative 74HC595 |
display | is the number of shift register on the chain (0 is the first!). |
Definition at line 121 of file Ss_hc595.cpp.
void SetCursor | ( | uint8_t | X, |
uint8_t | Y, | ||
uint8_t | type, | ||
uint8_t | display | ||
) |
move virtual cursor to x,y position
x | is the column y is the row type for now it's 1 or 2, depend of the specific display (different internal addressing). If you note x,y don't correspond as you want, change this parameter. |
Definition at line 211 of file Ss_hc595.cpp.
void SetDDRAM_Address | ( | uint8_t | address, |
uint8_t | display | ||
) |
Definition at line 223 of file Ss_hc595.cpp.
void SetHLcd | ( | uint8_t | val, |
uint8_t | display | ||
) |
Definition at line 294 of file Ss_hc595.cpp.
void SetLcdPin | ( | bool | D7, |
bool | D6, | ||
bool | D5, | ||
bool | D4, | ||
uint8_t | num | ||
) |
Definition at line 195 of file Ss_hc595.cpp.
void SetLcdRS | ( | bool | Val, |
uint8_t | display | ||
) |
Definition at line 288 of file Ss_hc595.cpp.
void SetLLcd | ( | uint8_t | val, |
uint8_t | display | ||
) |
Definition at line 299 of file Ss_hc595.cpp.
uint8_t* Buffer |
Definition at line 60 of file Ss_hc595.h.
uint8_t num_595 |
Definition at line 61 of file Ss_hc595.h.