Today’s editorial focuses on the introduction of PIC18F46K22 Microcontroller. We will check the basic introduction of the PIC18F46K22 microcontroller. I will explain the different features of PIC18F46K22 Microcontroller. At the end of the article, I will example codes on PIC18F46K22 Microcontroller like how to use LED blinking with PIC18F46K22 Microcontroller? How to interface LCD with PIC18F46K22 Microcontroller? How to use serial communication? and more other examples. Before studying that take a bird’s eye view at over the past couple of decades when microcontrollers have grown to be cheap with the powerful computing devices that even Mechanical Engineers can use for their research laboratories.
At the next stage, a modern personal computer connected via USB and signal processing system could do typical tasks as sensing pulses, monitoring of analog signals and providing timing signals at where the small microcontrollers requiring just a few milliamps of current to perform the task admirably at low cost. In modern microcontrollers, we can observe their remarkable different selection of hardware peripherals all within just a single chip.
PIC18F46K22 Getting started tutorials
If you are just getting starting with pic microcontrollers, I recommend you to check following tutorials for pic microcontrollers programming learning:
- Introduction to microcontrollers
- Introduction to 8 bit pic microcontrollers.
- How to program pic microcontroller
- How to use Mikro c for pic to write your first code for PIC18F46K22 microcontroller
- Pic microcontrollers programming in c
- Pic microcontrollers tutorials list
- Pic microcontroller projects
PIC18F46K22 Features
PIC18F46K22 Microcontroller has high computational performance also with the addition of high-endurance. Because of top features, many high performances and also because of sensitive applications, these microcontrollers are made a logical choice. Massive 30 channels of 10-bit A/D convertors making this microcontroller ideal for real word monitoring applications where a large number of A/D inputs is required. This unit feature has 64k of program memory. Like others, it’s units also programmed and debugged using the Microchip® debugging tools. It’s programmed to develop in C or assembly language. Power and Programming LED here is together for easy status indication.
Beginners Video Lecture PIC18F46K22
PIC18F46K22 Peripherals
The PIC18F46K22 Microcontroller is weighted with features, as we can observe an optimized core for high speed operation in PIC18F46K22 and the Charge Time Measurement Unit is included for touch screens and also for capacitive touch sensing. Full linear program memory addressing is for the 64k of program memory. Hardware is implemented 8 x 8 Multiply instruction enabling high speed operation which is up to 16 MIPs and up to 30-Channels of 10-bit A/D Converters are also included with 5 Compare/capture Modules and 2 USART ports.
And in it, up to 36 I/O points are accessible with all port connectors brought out standard headers for easy disconnect and connect. In this system, circuit program download is also provided and making enable the board to be easily updated with new modified and code as required, without removing the microcontroller. It is ideal as an interchangeable controller for a Real-Time System. And there includes powerful microchip PIC18F46K22 Microcontroller with 64Kbyte Memory.
The operating speed of controller is up to 16 MIPS and up to 36 I/O points also with easy to attach standard headers. In it, two I²C and SPI Channels and two RS232 connections are there and it also have reset button as well as power and programming LED. Internal EEPROM is also avail in it. On-Board regulator is 3.3V which is direct in-circuit programming and debugging with Microchip ICD2 and ICD3. There are four 16-bit timers and three 8-bit timers and huge 30 channels 10-bit A/D Convertors
Now let us take a detailed glance on features of PIC18FS6K22
Features of PIC18F46K22
- High Performance RISC CPU:
- Data EEPROM to 1024 bytes
- Priority levels for interrupts
- 8 x 8 Single-Cycle Hardware Multiplier
- 16-bit wide instructions, 8-bit wide data path
- Linear program memory addressing to 64 Kbytes
- Linear data memory addressing to 4 Kbytes
- Up to 16 MIPS operation
- 31-level, software accessible hardware stack
- C Compiler optimized instruction set
- Special Microcontroller Features:
- Full 5.5V operation (PIC18F2XK22/4XK22)
- Extended Watchdog Timer (WDT) with on-chip oscillator and software enable
- Power-up Timer (PWRT), Oscillator Start-up Timer (OST) and Power-on Reset (POR),
- Low voltage option available for 1.8V-3.6V operation (PIC18LF2XK22/4XK22)
- Programmable Brown-out Reset (BOR)
- Self-reprogrammable under software control
- Programmable code protection
- In-Circuit Debug via two pins
- In-Circuit Serial Programming™ (ICSP™) via two pins
- Analog Features:
- Analog-to-Digital Converter (ADC) module:
- 17 analog input channels (PIC18F/LF2XK22)
- 28 analog input channels (PIC18F/LF4XK22)
- Conversion available during Sleep
- 10-bit resolution
- Auto acquisition capability
- Programmable High/Low Voltage Detection (PLVD) module
- Analog comparator module with:
- Two rail-to-rail analog comparators
- Comparator inputs and outputs externally accessible and configurable
- Voltage reference module with:
- Programmable On-chip Voltage Reference (CVREF) module (% of VDD)
- Selectable on-chip fixed voltage reference
- Charge Time Measurement Unit (CTMU) for mTouch™ support:
- Up to 28 channels for button, sensor or slider input
- Peripheral Features:
- Three external interrupt pins
- 24/35 I/O pins and 1 input-only pin:
- High current sink/source 25 mA/25 mA
- Individually programmable weak pull-ups
- Individually programmable interrupt-on-pin change
- Up to seven Timer modules:
- Up to four 16-bit timers/counters with pre-scalar
- Dedicated, low-power Timer1 oscillator
- Up to three 8-bit timers/counters
- Up to two Capture/Compare/PWM (CCP) modules
- Up to three Enhanced Capture/Compare/PWM (ECCP) modules with:
- One, two or four PWM outputs
- Programmable dead time
- Selectable polarity
- PWM output steering control
- Auto-shutdown and Auto-restart
- Two Master Synchronous Serial Port (MSSP) modules with two modes of operation:
- 3-wire SPI (supports all 4 SPI modes)
- I2C™ Master and Slave modes (Slave mode with address masking)
- Two Enhanced Universal Synchronous Asynchronous Receiver Transmitter modules (EUSART):
- Supports RS-232, RS-485 and LIN 2.0
- Auto-Baud Detect
- Auto Wake-up on Start bit
- Extreme Low-Power Management with nanoWatt XLP™:
- Sleep mode: 100 nA, typical
- Watchdog Timer: 500 nA, typical
- Timer1 Oscillator: 500 nA @ typical 32 kHz Flexible Oscillator Structure
- Precision 16 MHz internal oscillator block:
- Factory calibrated to ± 1%
- 64 MHz performance available using PLL
- Software selectable frequencies range of 31 kHz to 16 MHz
- no external components required
- Two external Clock modes up to 64 MHz
- Two-Speed Oscillator Start-up
- 4X Phase Lock Loop (PLL)
- Secondary oscillator using Timer1 @ 32 kHz
- Four Crystal modes up to 64 MHz
- Fail-Safe Clock Monitor:
- Allows for safe shutdown if peripheral clock stops
- Analog-to-Digital Converter (ADC) module:
This new PIC18F46K22 microcontroller will be ideal for small embedded systems requiring a large number of A/D inputs. These microcontrollers will be easy to fit in a small project box and can also be easily integrated as a stand-alone controller or real-world monitoring node.