Questions tagged [pic]

PIC is a brand of 8, 16, and 32 bit RISC microcontrollers manufactured by Microchip. "PIC" originally was an acronym for "Peripheral Interface Controller".

More information on the Microchip website. Wikipedia also has a useful summary of the architecture and product families.

Related tags:

Useful links:

PIC32 tutorials

2800 questions
6
votes
2 answers

How to correctly manipulate the I/O pins of PIC chips?

I learned a concept that when changing bit value of PIC I/O pin, PC would first read the value of the I/O port, and change the value, and write the changed value to the register. I validate this argument by using this circuit: The code I wrote in…
Po-Jen Lai
  • 299
  • 4
  • 13
6
votes
2 answers

PIC16f877A resets due to external noise

I have faced this problem many times that I connects Relay with pic microcontroller and whenever I put Load on Relay's Contacts PIC16f877a resets. I some time solve this problem by triggering another relay from basic relay attached to PIC. But this…
Abdul Rehman
  • 411
  • 1
  • 5
  • 15
6
votes
3 answers

How do I detect revision of a particular PIC microcontroller?

I have a PIC18F4680. After reading the datasheet, it's still no clear to me how can I determine which revision the chip is. So how do I determine the revision of the microcontroller other than asking the supplier to provide that information to…
AndrejaKo
  • 23,431
  • 27
  • 112
  • 189
6
votes
1 answer

Why we use #pragma configs in PIC controllers?

Hi all I am new to the programming of PIC MCUs and I have with me PIC32 MCU. I have done a UART program in it and its working fine. I got the code for UART from Microchips website and its easily understandable. But I am confused with #pragma…
Aircraft
  • 1,666
  • 1
  • 12
  • 26
5
votes
1 answer

PIC16: How does one enter sleep mode using C?

The datasheet of my PIC16 refers to the "SLEEP instruction". I'm programming the PIC16 in C using MPLAB X and the XC8 compiler. How can I execute a SLEEP instruction on my PIC16 using C?
Randomblue
  • 11,003
  • 31
  • 106
  • 178
5
votes
2 answers

PIC24EP: What exactly are IOL, IOH currents

I'm going through the 'Electrical Characteristics' section of datasheet of PIC24EP128GP206 to find out minimum and maximum voltages and currents specific to GPIO pins. While doing so, I came across the terms IOL, IOH in the following section: What…
zeuschyant8
  • 165
  • 1
  • 4
5
votes
4 answers

How do you set the configuration bits for a PIC 16F1829 in MPLAB X?

I am new to PIC programming (but not C, embedded systems, etc.) I am using MPLAB X with the PIC16F1829 specified for the project. I have the following includes: #include #include #include __CONFIG( WDTDIS ); // No…
TDL
  • 439
  • 1
  • 5
  • 12
5
votes
1 answer

PIC16F1704 strange DAC output on DAC1OUT2 - it seems some other peripheral loads the pin down

I'm trying to get the DAC of the PIC16F1704 to work, specifically I want it to output on pin RA2/DAC1OUT2. There's nothing connected to that pin, and I've reduced the test code to this: #define _XTAL_FREQ 4000000 #define FCY 4000000ULL #include…
anrieff
  • 5,419
  • 1
  • 28
  • 51
4
votes
3 answers

Dangers of analog levels on digital PIC inputs?

I'm intending to use a PIC16F675, because it's what I have laying around, for a very simple task that involves turning on or off LEDs in response to changes in a pair of photodiodes. It really could all be done with basic components, but I'd much…
DigitalMan
  • 203
  • 1
  • 5
4
votes
3 answers

PIC16: How do I modify the configuration words?

As I understand, the configuration words are different to the standard 8 bit registers. They are 14 bit wide, and they can only be accessed in "programming mode". From reading the datasheet I do not understand how to enter programming mode and then…
Randomblue
  • 11,003
  • 31
  • 106
  • 178
4
votes
1 answer

Pic Microcontroller - Secondary Oscillator

I am planning on using a 32.768KHz crystal as a real-time clock and connecting this to a pic microcontroller via the SOSCI and SOSCO The Crystal is a Seiko SSP‑T6 32.768KHz watch crystal in 8 × 2.1 × 1.6mm surface‑mount package. 20ppm accuracy. 7pF…
Peter H
  • 521
  • 1
  • 4
  • 15
4
votes
3 answers

On PIC18 series, when should I use LAT register and when PORT?

I'm programming a PIC18F4680 using mikroElektronika's mikroC PRO compiler and I've set the LCD library to use following ports to communicate with LCD: // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at…
AndrejaKo
  • 23,431
  • 27
  • 112
  • 189
4
votes
1 answer

EPMP on pic24fj128da210

Does anyone have any experience in using the Enhanced Parallel Master Port on the PIC24 family? I am trying to use the example on page 42 of the EPMP manual - the "Read Example". My problem is that the example doesn't even begin to even think about…
Majenko
  • 56,223
  • 9
  • 105
  • 189
4
votes
2 answers

dsPIC33 and the upper half of PORTB

I am trying to use some of the IO pins of the dsPIC33FJ128GP802. The pins in question are RB8 thru RB11. I have written a little program that reads the input value of one of those pins and outputs it to pin RA4. All I get is straight 0, which ever…
Majenko
  • 56,223
  • 9
  • 105
  • 189
4
votes
1 answer

How to program the flash of multiple PIC controller

We have 6 dsPIC33F (16bit) controllers in the system and the system is quite big and complicated. All controllers are located on different PCBs and connected to each other through RS485 bus. First Pic controller (Master) is connected to PC and the…
1
2 3
9 10