LTPS C++ API
pic.h
1 
6 #ifndef __LPIC_H__
7 #define __LPIC_H__
8 
14 enum PicFreq
15 {
16  _8MHz = 8,
17  _16MHz = 16,
18  _32MHz = 32
19 };
20 
26 class Pic
27 {
28 public:
29 
30  Pic();
31 
32  virtual ~Pic();
33 
35 
39  void initPic(const char* socket, PicFreq freq);
40 
42 
46  void configurePwm(const char* socket, int channel);
47 
49 
53  void configureAdc(const char *socket, int channel);
54 
56 
63  void startPwm(const char *socket, int channel, int pulse, int period, int prescaler);
64 
66 
70  void stopPwm(const char* socket, int channel);
71 
73 
78  int getAdcVoltage(const char *socket, int channel);
79 };
80 
81 #endif
void stopPwm(const char *socket, int channel)
Stop PWM (initPic or configurePwm must called before)
void initPic(const char *socket, PicFreq freq)
PIC initialization (call before PIC first usage)
int getAdcVoltage(const char *socket, int channel)
Get ADC voltage (0...4000 mV) (configureAdc must called before)
void configureAdc(const char *socket, int channel)
Configure PIC as ADC (supported by Tibbit #31)
void startPwm(const char *socket, int channel, int pulse, int period, int prescaler)
Start PWM (configurePwm must called before)
void configurePwm(const char *socket, int channel)
Configure PIC as PWM (supported by Tibbit's #16, #17 and #31)
Class for PWM/ADC PIC16F1824 tibbit control (Tibbit #16, Tibbit #17 and Tibbit #31) ...
Definition: pic.h:26