Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

A PIC C Code Wizard

, 5 May 2003 CPOL
Creates C code templates for PIC microcontrollers. The default templates are for use with the Hi-Tech (tm) PICC compiler.
piccpc-wiz_demo.zip
Release
fls.exe
fls.doxygen
fls.dsp
fls.dsw
piccpc-wiz_src.zip
PICCPC.clw
PICCPC.dsp
PICCPC.dsw
grid
PICCPC.exe
res
default.bmp
images.bmp
PICCPC.ico
Thumbs.db
Template
confirm.inf
doc.doxygen
pic.inf
picpcproj.dsp
picpcproj.inf
PICCWiz_src.zip
PICCWiz.exe
default.bmp
idr_main.ico
images.bmp
PICCWiz.ico
DOC.DOXYGEN
PICPROJ.DSP
WIZINFO.INF
WIZPIC.INF
WIZPROJ.INF
Templates
doc.doxygen
picproj.dsp
wizinfo.inf
wizpic.inf
wizproj.inf
TreePropSheet
wizdlgs
PICCWiz.dsp
PICCWiz.dsw
PICCWiz.plg
#if !defined(AFX_ADC_H__5CF16096_8690_4C5C_890C_9B54819D7EC1__INCLUDED_)
#define AFX_ADC_H__5CF16096_8690_4C5C_890C_9B54819D7EC1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ADC.h : header file
//

#define ADCCHANNELS_ALL		0xFF
#define ADCCHANNELS_0123567	0xF7
#define ADCCHANNELS_01234	0x1F
#define ADCCHANNELS_0124	0x17
#define ADCCHANNELS_013		0x0B
#define ADCCHANNELS_012		0x03
#define ADCCHANNELS_NONE	0x00
#define ADCCHANNELS_014567	0xF3
#define ADCCHANNELS_0123456	0x3F
#define ADCCHANNELS_01245	0x37
#define ADCCHANNELS_0145	0x33
#define ADCCHANNELS_014		0x13
#define ADCCHANNELS_01		0x03
#define ADCCHANNELS_0		0x01

/////////////////////////////////////////////////////////////////////////////
// CADC dialog

class CADC : public CPropertyPage
{
	DECLARE_DYNCREATE(CADC)

// Construction
public:
	CADC();
	~CADC();

// Dialog Data
	//{{AFX_DATA(CADC)
	enum { IDD = IDD_ADC };
	CComboBox	m_cADCON0Clock;
	CListBox	m_cADCSignals;
	CListBox	m_cADCChannel;
	CComboBox	m_cADCON1;
	int		m_iADCClock;
	CString	m_sADCSignalName;
	//}}AFX_DATA


// Overrides
	// ClassWizard generate virtual function overrides
	//{{AFX_VIRTUAL(CADC)
	public:
	virtual BOOL OnKillActive();
	virtual BOOL OnSetActive();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CToolTipCtrl m_cToolTip;
	BOOL GetADCON();
	void SetADCClock( DWORD adcclock );
	BOOL ValidateADCClock( DWORD v );
	void UpdateADCChannelsList();
	BYTE m_ADCChannels;
	BOOL ValidateADCON1( DWORD v_adcon1, CString& s );
	// Generated message map functions
	//{{AFX_MSG(CADC)
	afx_msg void OnSelchangeAdcon1();
	afx_msg void OnAdcadd();
	afx_msg void OnUseadc();
	afx_msg void OnSelchangeAdcon0Clock();
	afx_msg void OnAdcremove();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ADC_H__5CF16096_8690_4C5C_890C_9B54819D7EC1__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Carlos Buelna
Delphi
United States United States
Carlos Buelna works in the automotive industry.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141223.1 | Last Updated 6 May 2003
Article Copyright 2003 by Carlos Buelna
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid