McMajan Library Pack  v 2.00
Improve your Arduino !
hc595 Class Reference

#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
 

Detailed Description

Definition at line 42 of file Ss_hc595.h.

Constructor & Destructor Documentation

§ hc595()

hc595 ( uint8_t  latch,
uint8_t  clock,
uint8_t  data,
uint8_t  num 
)

costructor

Parameters
latchST (pin 12 of 74HC595) - Latch - Storage register clock
clockSH (pin 11 of 74HC595) - Shift register clock
dataDS (pin 14 of 74HC595) - Serial Data input

Definition at line 10 of file Ss_hc595.cpp.

Member Function Documentation

§ CreateChar()

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

Parameters
displayis the number of register in the chain
byte MyChar[8] = {0,10,21,10,0,17,14,3};
My595.CreateChar(0,MyChar,3);
My595.DisplayChar(0,3);

Definition at line 244 of file Ss_hc595.cpp.

§ DirectdigitalWrite()

void DirectdigitalWrite ( uint8_t  ,
uint8_t *  ,
uint8_t   
)
inline

§ DisplayChar()

void DisplayChar ( uint8_t  buff,
uint8_t  display 
)

Write a single char on the specificated display starting from actual position.

Parameters
buffis the char to write display is the shift register number in the chain.

Definition at line 183 of file Ss_hc595.cpp.

§ DisplayReset()

void DisplayReset ( uint8_t  options,
uint8_t  num 
)

Reset of the display.

Parameters
optionsYou 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.

§ DisplayWrite()

void DisplayWrite ( const char *  buff,
uint8_t  display 
)

Write a string on the specificated display starting from actual position.

Parameters
buffis the buffer to write (null terminated!) display is the shift register number in the chain.

Definition at line 173 of file Ss_hc595.cpp.

§ Lcd_SetFreePin()

void Lcd_SetFreePin ( uint8_t  pin,
bool  status,
uint8_t  sr 
)

Sets the free pins (2 and 0) of 74HC595 connected to a display. ,.

Parameters
pinis the pin (0 or 2) status is the state (HIGH o LOW)
srand sr is the shift register number (from 0).

Definition at line 130 of file Ss_hc595.cpp.

References Send595().

+ Here is the call graph for this function:

§ PulseE()

void PulseE ( uint8_t  num)

internal function, don't use direcly

Definition at line 42 of file Ss_hc595.cpp.

References Send595().

+ Here is the call graph for this function:

§ 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.

+ Here is the caller graph for this function:

§ Send595Pin()

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.

Parameters
valis the 8 bit buffer to fill relative 74HC595
displayis the number of shift register on the chain (0 is the first!).

Definition at line 103 of file Ss_hc595.cpp.

References Send595().

+ Here is the call graph for this function:

§ SendLcdCommand()

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

My595.SendLcdCommand(LCD595_DISPLAY_ON_C,3);

Definition at line 276 of file Ss_hc595.cpp.

§ Set595Pin() [1/2]

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.

Parameters
D7-0are single true or false values of single bits
numis the number of shift register in the chain.

Definition at line 113 of file Ss_hc595.cpp.

§ Set595Pin() [2/2]

void Set595Pin ( uint8_t  val,
uint8_t  num 
)

set internal buffer of single 74hc595 (without update the real chip status but only internal buffer

Parameters
valis the 8 bit buffer to fill relative 74HC595
displayis the number of shift register on the chain (0 is the first!).

Definition at line 121 of file Ss_hc595.cpp.

§ SetCursor()

void SetCursor ( uint8_t  X,
uint8_t  Y,
uint8_t  type,
uint8_t  display 
)

move virtual cursor to x,y position

Parameters
xis 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.

§ SetDDRAM_Address()

void SetDDRAM_Address ( uint8_t  address,
uint8_t  display 
)

Definition at line 223 of file Ss_hc595.cpp.

§ SetHLcd()

void SetHLcd ( uint8_t  val,
uint8_t  display 
)

Definition at line 294 of file Ss_hc595.cpp.

§ SetLcdPin()

void SetLcdPin ( bool  D7,
bool  D6,
bool  D5,
bool  D4,
uint8_t  num 
)

Definition at line 195 of file Ss_hc595.cpp.

§ SetLcdRS()

void SetLcdRS ( bool  Val,
uint8_t  display 
)

Definition at line 288 of file Ss_hc595.cpp.

§ SetLLcd()

void SetLLcd ( uint8_t  val,
uint8_t  display 
)

Definition at line 299 of file Ss_hc595.cpp.

Member Data Documentation

§ Buffer

uint8_t* Buffer

Definition at line 60 of file Ss_hc595.h.

§ num_595

uint8_t num_595

Definition at line 61 of file Ss_hc595.h.


The documentation for this class was generated from the following files: