Welcome to the training module on An Introduction to PIC18FX6J Series MCUs. This training module introduces you to the basic features of the device, it’s peripheral interface, block diagrams and targeted applications.
Microchip released a range of low-power PIC microcontrollers with nano-Watt XLP extreme Low Power Technology and with sleep currents as low as 20 nano amps. These three new 8- and 16-bit MCU families join three other recent 8-bit families that are all part of Microchip’s nano-Watt XLP portfolio, providing designers with a rich and compatible low-power migration path that includes on-chip peripherals for USB and mTouch™ sensing solutions. This industry-leading combination of low power consumption and functionality, makes these PIC MCUs ideal for any battery-powered or power-constrained application.
This family of devices include several features intended to maximize reliability and minimize cost through elimination of external components. The oscillator can be configured for the application, depending on frequency, power, accuracy and cost. The inclusion of an internal RC oscillator also provides the additional benefits of a Fail-Safe Clock Monitor (FSCM) and a Two-Speed Start-up. The digital-core-logic of the PIC18F46J11 family of devices is designed on an advanced manufacturing process, and requires a 2.0V to 2.7V supply. The digital-core-logic obtains power from the VDD-CORE or V-CAP power supply pin.
These MCUs can be used in various fields of application including: Portable and Battery-powered Consumer applications, Industrial, the automotive field, and Medical applications. Examples of consumer applications are sealed and disposable electronics, portable electronics, white goods, game controllers, digital photo frames and coffee machines. Industrial applications include: energy harvesting or scavenging, utility meters, security systems, thermostats, sprinkler timers, portable temperature controllers, remote or portable gas sensors & remote sensor networks, data logging & asset tracking, as well as sealed or harsh environment sensors. The automotive field includes: diagnostic equipment, car alarms and key fobs); Examples of medical applications included: oxygen or bio flow meters, digital thermometers, patient monitors, lifestyle or fitness monitors and pedometers.
PIC MCUs featuring nanoWatt XLP Technology are useful in designing embedded applications with extremely low power consumption. The nano-Watt XLP Technology’s key advantages are: Sleep currents down to 20 nA, Real-Time Clock currents down to 500 nA, and Watchdog Timer currents down to 400 nA. The vast majority of low-power applications require one or more of these features. Nano-Watt XLP Technology combines all three in a comprehensive portfolio of devices. These PIC microcontrollers also introduce a new low-power mode called Deep Sleep. Microchip achieves these very low current draw figures by using two new process technologies, 0.35u for the PIC24 and 0.25u for the PIC18. These new processes boast a new transistor design with extremely low leakage current, and design switches to dynamically turn sections of the silicon off and on.
The PIC18F46J11 and PIC18F26J11 family can both manage power consumption through clocking to the CPU and the peripherals. In general, reducing the clock frequency and the amount of circuitry being clocked reduces power consumption. In the Run modes, clocks to both the core and peripherals are active. Sleep mode is entered by clearing the IDLE-N bit and executing the SLEEP instruction. The Idle modes allow the controller’s CPU to be selectively shut down while the peripherals continue to operate.
The device family incorporates a range of serial and parallel communication peripherals. It also includes two independent Enhanced U-SARTs and two Master Synchronous Serial Port (MSSP) modules, capable of both Serial Peripheral Interface (SPI) and I2C™ (Master and Slave) modes of operation. The device also has a parallel port and can be configured to serve as either a Parallel Master Port (PMP) or as a Parallel Slave Port or PSP. All devices in the family incorporate three Enhanced Capture/Compare/PWM modules, also known as ECCP modules, to maximize flexibility in control applications. Up to four different time bases may be used to perform several different operations at once. Each of the ECCPs offer up to four PWM outputs, allowing for a total of 8 PWMs. The ECCPs also offer many beneficial features, including polarity selection, programmable dead time, auto-shutdown and restart and Half-Bridge and Full-Bridge Output modes
The devices can be operated in eight distinct oscillator modes. Users can program the FOSC Configuration bits to select one of the modes. This device family has additional pre-scalers and post-scalers, which have been added to accommodate a wide range of oscillator frequencies. A Phase Locked Loop (PLL) circuit is provided as an option for users who want to use a lower frequency oscillator circuit, or to clock the device up to its highest rated frequency from a crystal oscillator. It also includes an internal oscillator block which generates two different clock signals, either of which can be used as the microcontroller’s clock source. The internal oscillator may eliminate the need for external oscillator circuits on the OSC1 and/or OSC2 pins.
The Parallel Master Port module or PMP, is an 8-bit parallel I/O module, specifically designed to communicate with a wide variety of parallel devices, such as communication peripherals, LCDs, external memory devices and microcontrollers. Because the interface to parallel peripherals varies significantly, the PMP is highly configurable. The PMP module can be configured to serve as either a master port or as a Parallel Slave Port.
Another feature of the device is the Enhanced Capture, Compare and PWM module. This family of devices have two Enhanced Capture/Compare/PWM (ECCP) modules: ECCP1 and ECCP2. These modules contain a 16-bit register, which can operate as a 16-bit Capture register, a 16-bit Compare register or a PWM Master/Slave Duty Cycle register. These ECCP modules are upward compatible with CCP, ECCP1 and ECCP2 and are implemented as standard CCP modules with enhanced PWM capabilities. In Capture mode, the CCPRX register pair, captures the 16-bit value of the TMR1 or TMR3 registers when an event occurs on the corresponding ECCPx pin. An event is defined as one of the following cases, Every falling edge, Every rising edge, Every 4th rising edge and every 16th rising edge. The event is selected by the mode select bits CCPxM, of the CCPxCON register. When a capture is made, the interrupt request flag bit CCPxIF is set.
In Compare mode, the 16-bit CCPRx register value is constantly compared against either the TMR1 or TMR3 register pair value. When a match occurs, the ECCPx pin can be: Driven high, Driven low, Toggled – that is high-to-low or low-to-high, Remain unchanged –that is reflects the state of the I/O latch. The action on the pin is based on the value of the mode select bits CCPxM. At the same time, the interrupt flag bit, CCPxIF, is set.
In PWM mode, the CCPx pin produces up to a 10-bit resolution PWM output, The PWM duty cycle is specified by writing to the CCPRxL register and to the CCPxCON bits. A PWM output has a time base (period) and a time that the output stays high (duty cycle). The frequency of the PWM is the inverse of the period (1/period).
The EUSART’s transmitter and receiver are functionally independent but use the same data format and baud rate. They transmits and receives the LSB first. The heart of the transmitter is the Transmit (Serial) Shift Register (TSR). The Shift register obtains its data from the Read/Write Transmit Buffer register, TXREGx. This register is loaded with data in software. The TSR register is not loaded until the Stop bit has been transmitted from the previous load. As soon as the Stop bit is transmitted, the TSR is loaded with new data from the TXREGx register. Once the TXREGx register transfers the data to the TSR register, the TXREGx register is empty and the TXxIF flag bit is set. The receiver block should be Initialised by configuring SPBRGx registers for the appropriate baud rate. Set or clear the BRGH and BRG16 bits, as required, to achieve the desired baud rate, Enable the asynchronous serial port by clearing SYNC bit, and setting SPEN bit, Enable the reception by setting CREN bit. The data is received on the RX pin and drives the data recovery block. This mode would typically be used in RS-232 systems.
The device has two master synchronous serial port modules desginated as MSSP1 and MSSP2. The modules operate independently. All of the MSSP1 module-related SPI and I2C I/O functions are hard-mapped to specific I/O pins. The SPI mode allows 8 bits of data to be synchronously transmitted and received simultaneously. All four modes of SPI are supported. When MSSP2 is used in SPI mode, it can optionally be configured to work with the SPI DMA sub-module.
The Charge Time Measurement Unit or CTMU is a flexible analog module that provides accurate differential time measurement between pulse sources, as well as asynchronous pulse generation. By working with other on-chip analog modules, the CTMU can be used to precisely measure time, measure capacitance, measure relative changes in capacitance or generate output pulses with a specific time delay. The CTMU is ideal for interfacing with capacitive-based sensors. The CTMU works in conjunction with the A/D Converter to provide up to 13 channels for time or charge measurement, depending on the specific device and the number of A/D channels available.
Thank you for taking the time to view this presentation on “ An Introduction to PIC18FX6J Series MCUs ” . If you would like to learn more or go on to purchase some of these devices, you may either click on the part list link, or simply call our sales hotline. For more technical information you may either visit the Microchip Technologies site, or if you would prefer to speak to someone live, please call our hotline number, or even use our ‘live chat’ online facility.