Provides class structure for simple control of Nixie Tubes using custom PCB
NixieTube.h@4:aac4aef5726e, 2016-12-15 (annotated)
- Committer:
- fischk08
- Date:
- Thu Dec 15 23:06:06 2016 +0000
- Revision:
- 4:aac4aef5726e
- Parent:
- 2:bb85bae1c1de
final lab version for presentation
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 | 4:aac4aef5726e | 13 | void set_dim(float); |
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 | 2:bb85bae1c1de | 21 | volatile int digit1; |
fischk08 | 2:bb85bae1c1de | 22 | volatile int digit2; |
fischk08 | 2:bb85bae1c1de | 23 | volatile int digit3; |
fischk08 | 2:bb85bae1c1de | 24 | volatile 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 |