Click here to Skip to main content
15,884,979 members
Articles / Desktop Programming / MFC

A PIC C Code Wizard

Rate me:
Please Sign up or sign in to vote.
4.94/5 (27 votes)
5 May 2003CPOL5 min read 156.1K   7.9K   46  
Creates C code templates for PIC microcontrollers. The default templates are for use with the Hi-Tech (tm) PICC compiler.
#if !defined(AFX_WIZDLG1_H__DECBE172_1BCC_4256_9E5C_0801F091665B__INCLUDED_)
#define AFX_WIZDLG1_H__DECBE172_1BCC_4256_9E5C_0801F091665B__INCLUDED_

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

#include "..\\grid\\gridctrl.h"

enum PIC_FEATURES {
	PRODUCT,
	PROG_MEM_WORDS,
	PROG_MEM_ROM_WORDS,
	EEPROM_DATA_MEM_BYTES,
	RAM_BYTES,
	IO_PINS,
	PACKAGES,
	ANALOG_CHANNELS,
	ANALOG_COMPARATORS,
	DIGITAL_PWM,
	DIGITAL_TIMERS,
	DIGITAL_SERIAL_IO,
	MAX_SPEED_MHZ,
	CCP_ECCP
};

/////////////////////////////////////////////////////////////////////////////
// CWizDlg1 dialog

class CWizDlg1 : public CPropertyPage
{
	DECLARE_DYNCREATE(CWizDlg1)

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

protected:
	BOOL m_bOnKillRun;
	int m_iLastRow;
	void FillWizInfo();
	BOOL ProcessPICInfo();
	CToolTipCtrl m_cToolTip;

// Dialog Data
	//{{AFX_DATA(CWizDlg1)
	enum { IDD = IDD_DIALOG1 };
	CGridCtrl m_Grid;
	float	m_dFrequency;
	int		m_iFlashMemWrite;
	int		m_iCodeProtect;
	//}}AFX_DATA


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

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CWizDlg1)
	virtual BOOL OnInitDialog();
	afx_msg void OnGridSelChange(NMHDR* pNotifyStruct, LRESULT* pResult);
	afx_msg void OnChangeFrequency();
	afx_msg void OnBrowse();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};

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

#endif // !defined(AFX_WIZDLG1_H__DECBE172_1BCC_4256_9E5C_0801F091665B__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)


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

Comments and Discussions