PIC12F1840-I/SN

PIC12F1840-I/SN


Specifications
SKU
11249023
Details

BUY PIC12F1840-I/SN https://www.utsource.net/itm/p/11249023.html

Parameter Description Value
Device Type Microcontroller PIC12F1840-I/SN
Package Type 8-Pin PDIP, SOIC, SSOP -
Operating Voltage (Vdd) Supply Voltage Range 1.8V to 5.5V
Operating Temperature Industrial Range -40°C to +85°C
Program Memory Flash Program Memory 4K x 14 bits
Data Memory (RAM) Data Memory 256 bytes
EEPROM Data Memory EEPROM Data Memory 256 bytes
Clock Frequency Internal Oscillator 32 kHz to 16 MHz (up to 32 MHz with external oscillator)
I/O Pins General Purpose I/O Pins 6
Analog-to-Digital Converter (ADC) ADC Channels 10-bit, up to 9 channels
Digital-to-Analog Converter (DAC) DAC Channels 1 x 5-bit
Comparator Comparators 2
Timers/Counters Timers 2 x 8-bit, 1 x 16-bit
Capture/Compare/PWM Modules CCP Modules 2
USART Universal Synchronous Asynchronous Receiver Transmitter 1
MSSP Module Master Synchronous Serial Port 1 (I2C, SPI)
Brown-out Reset (BOR) Brown-out Reset Yes
Watchdog Timer (WDT) Watchdog Timer Yes
Low-Voltage Programming (LVP) Low-Voltage Programming Yes
Power-on Reset (POR) Power-on Reset Yes
Power-saving Modes Sleep Mode, Idle Mode -
Programming Interface In-Circuit Serial Programming (ICSP) Yes

Instructions for Use:

  1. Power Supply:

    • Ensure the supply voltage (Vdd) is within the specified range of 1.8V to 5.5V.
    • Connect the Vss pin to ground.
  2. Oscillator Configuration:

    • For internal oscillator, configure the OSCCON register.
    • For external oscillator, connect the appropriate crystal or resonator to the OSC1 and OSC2 pins.
  3. I/O Configuration:

    • Configure the TRIS register to set the direction of I/O pins (input or output).
    • Use the PORT register to read or write to I/O pins.
  4. ADC Configuration:

    • Enable the ADC module by setting the appropriate bits in the ADCON0 register.
    • Select the desired channel using the ADCON1 register.
    • Start the conversion by setting the GO/DONE bit in the ADCON0 register.
  5. DAC Configuration:

    • Enable the DAC module by setting the appropriate bits in the DACCON0 register.
    • Set the DAC output value using the DACVAL register.
  6. Comparator Configuration:

    • Enable the comparators by setting the appropriate bits in the CM1CON0 and CM2CON0 registers.
    • Configure the inputs and outputs of the comparators using the CM1CON1 and CM2CON1 registers.
  7. Timer Configuration:

    • Enable the timers by setting the appropriate bits in the T0CON, T1CON, and T2CON registers.
    • Set the prescaler and postscaler values as needed.
  8. CCP Module Configuration:

    • Enable the CCP modules by setting the appropriate bits in the CCP1CON and CCP2CON registers.
    • Configure the mode (capture, compare, PWM) using the same registers.
  9. USART Configuration:

    • Enable the USART module by setting the appropriate bits in the TXSTA and RCSTA registers.
    • Set the baud rate using the SPBRG register.
  10. MSSP Module Configuration:

    • Enable the MSSP module by setting the appropriate bits in the SSPCON1 register.
    • Configure the mode (I2C or SPI) using the same register.
  11. Brown-out Reset (BOR):

    • Enable BOR by setting the appropriate bits in the BORCON register.
  12. Watchdog Timer (WDT):

    • Enable WDT by setting the appropriate bits in the WDTCON register.
    • Clear the WDT periodically to prevent reset.
  13. Low-Voltage Programming (LVP):

    • Enable LVP by setting the appropriate bits in the configuration words.
  14. Power-on Reset (POR):

    • POR is automatically enabled and will reset the device when power is applied.
  15. Power-saving Modes:

    • Enter sleep mode by setting the SLEEP bit in the SLEEP register.
    • Enter idle mode by setting the IDLE bit in the SLEEP register.

For detailed programming and configuration, refer to the PIC12F1840 datasheet and application notes provided by Microchip.

(For reference only)

View more about PIC12F1840-I/SN on main site