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

learn more… | top users | synonyms (8)

1
vote
1answer
38 views

RTCC interupt doesn't work

This is my first use of the RTCC interrupt for dspic33F and P24h. I have set the date and the alarm, when the alarm goes on, the LED attached in PIN 15 will blink. The code compiles but there is no ...
1
vote
2answers
56 views

PIC18 xc8 compiler : how to resolve warning (335) unknown pragma “code”

I'm trying to compile this code to blink led with button interrupt, using xc8 compiler and PIC18F4550. I got those warning, so the code lines are ignored and the program doesn't work properly (by ...
1
vote
1answer
46 views

Implementing input capture correctly on a PIC

I'm using a PIC16LF1827 with the XC8 compiler in MPLAB X. I need to store the time between pulses that are coming from an external moisture sensor. The length of time correlates to the measure of ...
3
votes
3answers
104 views

Frequently used functions, performance improvements using static variables?

Does defining variables (large arrays) as static inside a function have any performance improvements if the function is to be called repeatedly say in the order of seconds?
2
votes
1answer
41 views

How to configure PIC24F oscillator?

I'm coding on PIC24F and I'm still fighting with oscillator configuration. Between configuration bits and SFRs such as CLKDIV and OSCCON I am a 'bit' lost... I've been making things work by trial and ...
1
vote
0answers
39 views

Weird bug in MPLAB X IDE

When using the RTCC module in the PIC24F, we need to use the secondary oscillator (by setting bit #2 of OSCCONL register) and disable the write lock on the RTCC registers. Now the write lock can be ...
1
vote
1answer
60 views

Problem with the explorer 16 dev board

I have the explorer 16 dev board equipped with the PIC24FJ128GA010. I wrote a C code to write something on the LCD and a LED blinking after that. I wrote the same code in assembly and both codes work. ...
1
vote
1answer
107 views

Writing 3 bytes data in EEPROM

In pic18f45k80, the datasheet says one can read and write a byte (8bit) data in EEPROM. I need to write 3 bytes data at once and read it back at once because that 3 bytes data consists of two ...
1
vote
3answers
95 views

External oscillator problem

I have this sample program to blink LED with PIC18F4550 using external oscillator. I'm using a 20.000 MHz crystal oscillator with 30pF capacitors. The problem is when I wire the capacitors the the ...
4
votes
3answers
112 views

How to isolate processor noise

I'm designing a board that consists of a dspic33F, responsible for running a noise reduction algorithm and compressing audio with a Speex library, and an audio codec connected to an electret ...
3
votes
1answer
49 views

Is there any way to programmatically reset the BWP bit on a PIC32

We have a product using the PIC32MX795F512L out in the field that has firmware in both the boot and program sections. The boot flash is write protected using the BWP bit 24 = 0 in DEVCFG0. The ...
3
votes
2answers
107 views

Casting integer to character

I am using PIC18f microcontroller. I have to write a 16 bit integer variables (2 bytes) which was cast into two character variable i.e to write each byte in a consecutive adrressess of EEPROM. By ...
0
votes
0answers
71 views

8-Bit data encoding using Hamming code

I am using Pic18f45k80 controller for my project. I am in need of storing 60V lead acid battery's voltage level in internal EEPROM. I am using Hamming code as Error correction algorithm. My data is ...
0
votes
1answer
80 views

PIC microcontroller and different EEPROM sizes?

What is the significance of how big the EEPROM is for a microcontroller. I'm trying to select another PIC (first one I chose - PIC16LF1827 - didn't have enough RAM for the application I needed it for) ...
1
vote
1answer
104 views

PIC18 electric connection loose

I'm using a PIC 18F4550 to blink an LED in a breadboard through a resistor. I think the circuit is correct because a simulation with Proteus works fine. The physical circuit doesn't work unless I ...
0
votes
0answers
38 views

Programming pic24fv32ka301 only works after resetting by turn off

I am only able to program my pic24fv32ka301 after I turn the power off and on. When I try to program the pic without resetting the device, one of the two errors is displayed: ...
0
votes
1answer
38 views

Configuring SPI on PIC16LF1827

Has anyone encountered problems getting SPI up and running on a PIC? I'm using a PIC16LF1827 and am trying to output data via SPI to what will eventually be an LCD graphics screen. The PIC will be the ...
1
vote
1answer
81 views

PIC12LF1552 I2C; uC won't exit Start Condition

So I've been tackling this problem with integrating I2C functionality into my code, which is documented here on StackOverflow: ...
2
votes
1answer
42 views

dsPIC30F - how to config max performance crystal?

I was looking at the datasheet http://ww1.microchip.com/downloads/en/devicedoc/70138c.pdf in the TABLE 20-1: OSCILLATOR OPERATING MODES. But I'm not sure, which configuration get me the best ...
1
vote
2answers
54 views

How to stabilize adc output display on 7 segment

I am designing a simple voltmeter. I am using 8 bit ADC of PIC16F72 and Mikro C compiler with a multiplexed 7 segment display. I am getting ADC value on 7 segment display but its continuously ...
0
votes
2answers
36 views

Electret Microphone recognize music with FFT

Do you think is possible that this Electret Microphone https://www.sparkfun.com/products/9964 plus a DSPIC can recognize music frequencys with a FFT, or the electret only recognize the sound levels?
0
votes
1answer
43 views

pic18f instruction reference for XC8 Assembler

I found lots of tutorials online on PIC18 assembly programming, but i did not found any official document from microchip on PIC18 architecture and assembly programming. Can anybody share the link ?
0
votes
0answers
52 views

PIC16F72 Unable to use all pins of PORTC

I have written code for a voltmeter using a PIC16F72, but I am unable to use PORTC pins 1 & 2 as Digital Output. The datasheet says we can use all pins as output, but it does not work in my ...
0
votes
2answers
63 views

Which is better after rewriting the ROM on a PIC16F? A software reset instruction or a watchdog reset

I am working on a project where the uP can be calibrate at any time. The new calibrated values are stored in the uPs ROM. After the calibration is complete, I have to reset the uP such that the ...
8
votes
3answers
380 views

How is this circuit for interfacing 20V signal with 3v3 microcontroller

I have designed the following circuit to interface a 12-20V signal to a microcontroller running on 3.3 volts. The signal is either 20V or open circuit. I want the circuit to be as resilient as ...
0
votes
1answer
112 views

Maximum resistance that can be put in series with an input to a (PIC) microcontroller

EDIT: What is the maximum resistance that can be put in series with an input to the PIC. Original Question: I am designing a clamping circuit to protect my microcontroller's pins, I need to know the ...
-1
votes
3answers
98 views

PIC32 C programming [closed]

I'm getting into PIC microcontrollers and more specifically PIC32s. For all the people that program these chips, how did you learn? I've seen books to learn C programming for PICs but is it really ...
0
votes
1answer
56 views

No response from AVR microprocessor while programming

I've been attempting to program a few different micro-controllers using nothing but an FTDI 5V TTL cable and self-written software to bitbang the needed pins on the chips. Until now I had success only ...
0
votes
1answer
69 views

Microchip PIC32 MEB Audio Recording

Well, I was just wondering, I have been using the Microchip PIC32 USB Starter Kit with the MEB (Multimedia Expantion Board 1) for some projects. One of them is to record audio and analyse it, the ...
1
vote
1answer
44 views

PIC18F24K50 vendor-defined USB device using libusb, what is needed?

I'm trying to learn how to communicate with a PIC18F24K50 through USB. I read somewhere that a vendor-defined device plus libusb/Winusb is to be referred over HID and CDC for cross-platform custom USB ...
1
vote
1answer
38 views

mpasm - overlapping variables in a udata directive

In MPASM it appears I can do this to make paylen_lo and bytesleft have the same memory location: ...
2
votes
3answers
141 views

Properly grounding 2 MCUs using I2C

I'm building a mechatronic system that consists of 1)XY Gantry controlled with PIC32 and a DIY motor shield and 2)control box with PIC24 three potentiometers + room for expansion, typically located ...
3
votes
0answers
87 views

Lithium battery consuming more power on Sleep Mode

I am trying to reduce the power consumption for PIC18F87J11 on sleep mode. The PIC is drawing about .01 mA (6 uA) on sleep mode with Alkaline AAA batteries and other power source, but when I use ...
1
vote
1answer
126 views

Regarding Microchip XC8 compiler's registers and bits definitions

I'm going to take a random 8-bit Microchip microcontroller: PIC16F887. Let's have a look at how the XC8 compiler (and the HI-TECH PICC, for that matter) is defining a register (SFR) and its ...
0
votes
1answer
71 views

Switching a relay through a wireless connection

I want to create a circuit which will wirelessly drive a relay. I only have a little experience with Arduino. I know what peripherals I need, but I don't know what micro-controller to use. I made a ...
1
vote
1answer
44 views

Reception without interrupt in USART of PIC18

I would like to know how to receive data without interrupts in the PIC18 controller. After setting the USART settings and baud rating, what things must be done so that USART receives properly without ...
1
vote
1answer
136 views

Is this current measurement solution okay?

One wishes to measure the RMS current (12A max.) drawn by an AC motor using a PIC16F887 at intervals of 1 second. One cost effective solution I am considering is using a current transformer, a bridge ...
0
votes
3answers
140 views

Run program directly with MPLAB X(PIC16F628A)

I want to blink LED with PIC16F628A and run it directly with the button make and program device main project of MPLAB X. to programing the PIC I did simple wiring ...
0
votes
1answer
63 views

Usart puzzle giving strange output on tx pins

I have tried working out usart peripheral of pic18f26j50 and it found out to be working very well. This one is for a pic18f26j50 in bread board with observing TX pin while transmitting in a loop. ...
1
vote
1answer
203 views

How to intitalize data in Program Memory

Im using MPLAB IDE & C18 compiler to program Pic18f2550. I have to initialize a const string in program memory to save space in RAM how do I do it ?
0
votes
1answer
92 views

Low-cost Up-Down Servo solution

I have a small project and I'm interested "upgrading" to a more produce-efficient design. Please note I'm no electrical engineer. I want to move a small servo (like this one ...
0
votes
2answers
99 views

5v tolerance on 3.3v PIC

Many PIC microcontrollers such as PIC24EP512GU810 have 5V tolerant pins. My question is how does this work. Do these devices have clamping diodes for ESD protection? Would clamping the input voltage ...
0
votes
0answers
41 views

UART PIC18F8722

I'm trying to connect a bluetooth module (the baudrate is 9600) with a PIC18F8722. The connection is with UART and I programmed this: ...
1
vote
2answers
138 views

Correct ways for implementing standard inbuilt watch dog timers

I'm bit new with using applications that use watch dog timers and i'm up to use one for the first time. I'm using pic18f26j50 and it got an internal watch dog timer which got a limit from 2ms and can ...
2
votes
1answer
70 views

PIC32 sleep mode with watchdog wakeup failing

I am in the process of trying to get a PIC32MX795F512L to run with lower power consumption. I'm trying to get it to enter sleep mode and then be woken by the watchdog timer. All pretty standard ...
3
votes
1answer
61 views

PIC datasheet is unclear on clearing framing error

On the PIC16F1829, FERR reflect the framing error status of the top byte in the two byte serial receive FIFO. Thus, assuming no new bytes arriving with framing ...
0
votes
1answer
91 views

Displaying different Data on 7 segment

I am Designing a Digital Stabilizer ,where I have to Use a Multiplexed 7 segment Display to Show Input Voltage & Output Voltage ,I have successfully able to see input voltage but I am unable to ...
1
vote
1answer
79 views

CAN BUS MESSAGES DESIGN SOFTWARE [closed]

I am currently designing with the PIC32 Micros and the 2 embedded CAN bus Controllers As the CAN bus architecture from node to node can be very complex with CAN messages, nodes filters, masks, CAN ...
0
votes
4answers
108 views

Best way of confirming system clock of controller

I would like to know the tricks or hints which could be used to find the system clock of 8 bit micro controllers. What are the cool ways in which we could find the system clock and can be verified ...
0
votes
2answers
57 views

Clamping Voltage without disturbing the power supply

I am using a circuit similar to the following, to clamp the input to my microcontroller to around 5 volts: How do I make sure that the (5V) power supply is not disturbed and stays regulated. I am ...