⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a2demo.txt

📁 picc_18v 8.35pl35 PIC18系列单片机开发C编译器
💻 TXT
字号:
Title: a2demo

Target: PIC18F452

Description:
    A sample project file to be used with HI-TIDE, to
    demonstrate the functionality of the microcontroller's analog
    to digital converter.

Controls:
    This microcontroller has up to 8 analog input channels
    that may be converted to a digital value. Each of the
    potentiometers in the Virtual IO display is connected to one of
    the 8 analog input channels.

    The two push button switches are used to change which
    of the 8 channels is currently selected for A2D conversion. The
    current channel selected is indicated by the LED panel and in
    the Serial IO window.

    There are 15 different ways the A2D port can be configured.
    Configuration mode is determined by PCFG0:3 (ADCON1 bits).
    These bits can easily be modified via the DIP switch in the
    Virtual IO window.

    To understand each of the 15 configuration modes available,
    please refer to the datasheet for the PIC18F452 device.

Connections to the PIC18F452:
    Potentiometer 1  -> PORTA0 (analog ch0)
    Potentiometer 2  -> PORTA1 (analog ch1)
    Potentiometer 3  -> PORTA2 (analog ch2)
    Potentiometer 4  -> PORTA3 (analog ch3)
    Potentiometer 5  -> PORTA5 (analog ch4)
    Potentiometer 6  -> PORTE0 (analog ch5)
    Potentiometer 7  -> PORTE1 (analog ch6)
    Potentiometer 8  -> PORTE2 (analog ch7)
    LED Panel [0:7]  -> PORTD [0:7]
    Pushbutton 1     -> PORTB4
    Pushbutton 2     -> PORTB5
    DIP switch [0:3] -> PORTC [0:3]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -