Skip to content

Morillos123/pic18f57q84-adc-channel-sequence

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

pic18f57q84-adc-channel-sequence

In this project the Analog-to-Digital Converter with Computation and Context Module (ADCCC) of the PIC18F57Q84 is used to read two channel (ANA0 & ANA1) by 4 channel sequencer.

Software Used

Hardware Used

Setup

In this demo,

  • PIC18F57Q84 MCU is used to read an voltage on ANA0 & ANA1.

MCC Settings

This section shows the settings used in the demo/example for various MCU modules configuration. These settings were done using the Microchip Code Configurator (MCC). Open MCC to look at the settings of the modules.

System Module Settings

The MCU uses the high frequency external oscillator (10MHz), and the clock is set to 4*PLL (40 MHz).

ADCC Settings

The ADCC is configured with a clock of FOSC/2.




TIMER0 Settings

The timer0 is configured to 500ms to periodly trigger ADC.

UART1 Settings

The Uart1 is used to print the result of ADC.

Pin Manager Settings

The pins are configured as follows:

  • Pin RA0 is set as analog input (ANA0)
  • Pin RA1 is set as analog input (ANA1)

Interrupt Settings

Just one interrupt from ADC Context 4.

Configuration Changed

You should disable JTAG function in configuration bit.

Demo

  1. After making the above hardware connections, build demo firmware and load the generated hex file onto the PIC18F57Q84 MCU.
  2. When the demo firmware is loaded, you could see the print result from serial terminal.

Conclusion

This example shows the ADC new feature of PIC18F57Q84 - Channel Sequencer and Context.

About

This is an example about verify context sequencer scan function.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 49.0%
  • C++ 29.0%
  • Makefile 21.0%
  • Shell 1.0%