McMajan Library Pack  v 2.00
Improve your Arduino !
Ss_hc595.h
Go to the documentation of this file.
1 
2 #ifndef _595_h
3 #define _595_h
4 
6 
7 
8 
9 //#include <Ss_FastArduino.h>
10 #if defined FASTARDUINO_ON && defined Mc_HC595_DEBUG
11  //#warning USE_FASTARDUINO not defined inside hc595
12 #endif
13 
14 /*
15 #ifndef _FastArduino_h
16 //#warning fast not defined inside hc595.h
17  #define FastdigitalWrite(a,b) digitalWrite(a,b)
18  #define FastshiftOut(a,b,c,d) shiftOut(a,b,c,d)
19 #endif */
20 
21 
22 #define SetBackLight(a,b,c) Lcd_SetFreePin(a,b,c)
23 #define DisplayClean(a) SendLcdCommand(LCD595_DISPLAY_CLEAR,a);
24 
25 #define LCD595_DISPLAY_CLEAR 1
26 
27 //accensione / spegnimento display
28 #define LCD595_DISPLAY_ON_CB 15
29 #define LCD595_DISPLAY_ON_C 14
30 #define LCD595_DISPLAY_ON_B 13
31 #define LCD595_DISPLAY_ON 12
32 #define LCD595_DISPLAY_OFF 8
33 
34 //initdisplay
35 #define LCD595_BASIC_DISPLAY_INIT 32
36 #define LCD595_USEFONT_5X10 4
37 #define LCD595_MORELINES 8
38 
39 
40 
41 
42 class hc595
43 {
44  private:
45  uint8_t latchPin;
46  uint8_t clockPin;
47  uint8_t dataPin;
48 //volatile uint8_t
49 
50  uint8_t * p_Latch;
51  //uint8_t * p_Clock;
52  //uint8_t * p_Data;
53 
54  uint8_t b_Latch;
55  //uint8_t b_Clock;
56  //uint8_t b_Data;
57 
58 
59 public:
62 
63  hc595(uint8_t,uint8_t,uint8_t,uint8_t);
64  void PulseE(uint8_t );
65  void Send595(void);
66 
67  void Set595Pin(bool,bool,bool,bool,bool,bool,bool,bool,uint8_t);
68  void Set595Pin(uint8_t ,uint8_t);
69  void Send595Pin(uint8_t,uint8_t);
70 
71  void SetLcdPin(bool,bool,bool,bool,uint8_t);
72 
73  void DisplayReset(uint8_t,uint8_t);
74 
75  void DisplayWrite(const char *,uint8_t);
76  void DisplayChar(uint8_t ,uint8_t );
77 
78  void CreateChar(uint8_t ,uint8_t[],uint8_t );
79 
80  void SetLcdRS(bool,uint8_t);
81  void SetHLcd(uint8_t,uint8_t);
82  void SetLLcd(uint8_t,uint8_t);
83  void SendLcdCommand(uint8_t,uint8_t);
84 
85 
86  void SetCursor(uint8_t, uint8_t,uint8_t, uint8_t);
87  void SetDDRAM_Address(uint8_t,uint8_t );
88 
89 
90  void Lcd_SetFreePin(uint8_t, bool,uint8_t);
91 
92 
93  inline void DirectdigitalWrite(uint8_t , uint8_t * ,uint8_t );
94 
95  //void DirectshiftOut(const uint8_t );
96 
97  //~hc595();
98 
99 };
100 
101 
102 
103 
104 #endif
void SetLcdRS(bool, uint8_t)
Definition: Ss_hc595.cpp:288
void SendLcdCommand(uint8_t, uint8_t)
This function is useful to send directly some commands to the display. val This is the option parame...
Definition: Ss_hc595.cpp:276
void DisplayWrite(const char *, uint8_t)
Write a string on the specificated display starting from actual position.
Definition: Ss_hc595.cpp:173
void DisplayReset(uint8_t, uint8_t)
Reset of the display.
Definition: Ss_hc595.cpp:143
void SetDDRAM_Address(uint8_t, uint8_t)
Definition: Ss_hc595.cpp:223
hc595(uint8_t, uint8_t, uint8_t, uint8_t)
costructor
Definition: Ss_hc595.cpp:10
uint8_t num_595
Definition: Ss_hc595.h:61
#define LCD595_DISPLAY_CLEAR
Definition: Ss_hc595.h:25
uint8_t * Buffer
Definition: Ss_hc595.h:60
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 sin...
Definition: Ss_hc595.cpp:113
void Set595Pin(uint8_t, uint8_t)
set internal buffer of single 74hc595 (without update the real chip status but only internal buffer ...
Definition: Ss_hc595.cpp:121
void SetLcdPin(bool, bool, bool, bool, uint8_t)
Definition: Ss_hc595.cpp:195
void SetHLcd(uint8_t, uint8_t)
Definition: Ss_hc595.cpp:294
void DirectdigitalWrite(uint8_t, uint8_t *, uint8_t)
void SetCursor(uint8_t, uint8_t, uint8_t, uint8_t)
move virtual cursor to x,y position
Definition: Ss_hc595.cpp:211
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)...
Definition: Ss_hc595.cpp:244
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 dir...
Definition: Ss_hc595.cpp:103
void SetLLcd(uint8_t, uint8_t)
Definition: Ss_hc595.cpp:299
void Send595(void)
It sends the internal buffer to the shift register chain. This produce a update of all outputs of all...
Definition: Ss_hc595.cpp:59
void Lcd_SetFreePin(uint8_t, bool, uint8_t)
Sets the free pins (2 and 0) of 74HC595 connected to a display. ,.
Definition: Ss_hc595.cpp:130
void PulseE(uint8_t)
internal function, don&#39;t use direcly
Definition: Ss_hc595.cpp:42
void DisplayChar(uint8_t, uint8_t)
Write a single char on the specificated display starting from actual position.
Definition: Ss_hc595.cpp:183