Provides class structure for simple control of Nixie Tubes using custom PCB
NixieTube.h@1:0470cc006ce7, 2016-12-14 (annotated)
- Committer:
- fischk08
- Date:
- Wed Dec 14 05:27:15 2016 +0000
- Revision:
- 1:0470cc006ce7
- Parent:
- 0:34f3e0f37c55
- Child:
- 2:bb85bae1c1de
Updated Library to use ticker rather than mbedrtos. Added Debug output messages
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fischk08 | 0:34f3e0f37c55 | 1 | /* NixieTube.h */ |
fischk08 | 0:34f3e0f37c55 | 2 | #ifndef NIXIETUBE_H_ |
fischk08 | 0:34f3e0f37c55 | 3 | #define NIXIETUBE_H_ |
fischk08 | 0:34f3e0f37c55 | 4 | |
fischk08 | 0:34f3e0f37c55 | 5 | #include "mbed.h" |
fischk08 | 1:0470cc006ce7 | 6 | class NixieTube |
fischk08 | 0:34f3e0f37c55 | 7 | { |
fischk08 | 0:34f3e0f37c55 | 8 | public: |
fischk08 | 1:0470cc006ce7 | 9 | NixieTube(PinName,PinName,PinName,PinName); |
fischk08 | 0:34f3e0f37c55 | 10 | ~NixieTube(); |
fischk08 | 1:0470cc006ce7 | 11 | void update_individual_nixie_tube(int,int); |
fischk08 | 1:0470cc006ce7 | 12 | void update_all_nixie_tube(int,int,int,int); |
fischk08 | 0:34f3e0f37c55 | 13 | void set_dim(float,int); |
fischk08 | 1:0470cc006ce7 | 14 | void debug_digits(); |
fischk08 | 0:34f3e0f37c55 | 15 | private: |
fischk08 | 0:34f3e0f37c55 | 16 | DigitalOut _sdi; |
fischk08 | 0:34f3e0f37c55 | 17 | DigitalOut _scl; |
fischk08 | 0:34f3e0f37c55 | 18 | DigitalOut _rcl; |
fischk08 | 0:34f3e0f37c55 | 19 | PwmOut _cen; |
fischk08 | 1:0470cc006ce7 | 20 | int curr_tube; |
fischk08 | 0:34f3e0f37c55 | 21 | int digit1; |
fischk08 | 0:34f3e0f37c55 | 22 | int digit2; |
fischk08 | 0:34f3e0f37c55 | 23 | int digit3; |
fischk08 | 0:34f3e0f37c55 | 24 | int digit4; |
fischk08 | 0:34f3e0f37c55 | 25 | uint32_t delay1; |
fischk08 | 0:34f3e0f37c55 | 26 | uint32_t delay2; |
fischk08 | 0:34f3e0f37c55 | 27 | float brightness; |
fischk08 | 1:0470cc006ce7 | 28 | |
fischk08 | 1:0470cc006ce7 | 29 | void nixie_shiftout(); |
fischk08 | 0:34f3e0f37c55 | 30 | int nixie_id_convert(int); |
fischk08 | 0:34f3e0f37c55 | 31 | void send_nixie_shiftreg(int, int, int); |
fischk08 | 0:34f3e0f37c55 | 32 | |
fischk08 | 1:0470cc006ce7 | 33 | Ticker tickSeq; |
fischk08 | 0:34f3e0f37c55 | 34 | }; |
fischk08 | 0:34f3e0f37c55 | 35 | |
fischk08 | 0:34f3e0f37c55 | 36 | #endif /* NIXIETUBE_H_ */ |
fischk08 | 0:34f3e0f37c55 | 37 |