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)

0
votes
0answers
34 views

SPI interface using pic with cc2500

Datasheet of cc2500 is here: http://www.ti.com/lit/ds/symlink/cc2500.pdf . I looked at the SPI timing diagram on page 22. I have gone through the datasheet of cc2500 and understood that. idle state ...
5
votes
3answers
752 views

Is this a correct way to have a 1 second delay?

If I have a PIC24 with a 4 MHz frequency. Is it accurate to have a 1 second delay by having 4 million clock cycles? I made a 1 second delay like this on my PIC24FJ128GA010: ...
1
vote
1answer
119 views

The PIC24F RETURN instruction

The PIC model I have is PIC24FJ128GA010. My question how many clock cycles does the RETURN instruction consume? The datasheet says 3(2), what does that mean?
1
vote
1answer
33 views

Microchip's XC8 Linker doesn't recognize some custom section names

Slightly related to this one: http://programmers.stackexchange.com/questions/254734/microchip-xc8-how-to-pack-code-against-an-upper-limit I can relocate code just fine, but I'm having some trouble ...
1
vote
1answer
39 views

How does the PIC's PMCON1.WRERR bit actually work?

I know from the datasheet that it gets set automatically on a rising edge of the WR bit and cleared automatically on a successful completion. Thus, if it's still on, then something went wrong. So ...
-2
votes
0answers
44 views

PIC24 or MSP430 [on hold]

This is my first question in this forum, so kindly go easy on me. So As the title suggests I would appreciate if someone helps me to decide which mcu will be better for my application. I've been using ...
0
votes
0answers
37 views

PIC16f EEPROM Write Errors

Developing on PIC16f1936 and using MPLAB X IDE with the XC8 complier. I have been stuck on this for a while and no one in the office can figure it out either. I've been given this project where I ...
1
vote
1answer
38 views

Finding Equivalent Thevenin Resistence

For the following circuit: I'm solving for the Rth at node 2. In the solution guide, it shows that the Rth = (10k || 10k). I don't understand how this is so, by following the resistence equivalent ...
0
votes
2answers
154 views

Why can't I use a variable in an if statement?

I am new to Pic microcontrollers and just started programming them. Now my problem lies in this code: ...
-1
votes
1answer
93 views

Proteus error “Stack overflow is forcing device reset”

I used PIC18F452 microcontroller for my project. And I'm using mikroc pro software. My code compiled successfully. But in proteus, it will give the error "Stack overflow is forcing device reset". And ...
2
votes
2answers
153 views

Using internal pull-ups for I2C on PIC18F

I'm working with a PIC18F46J53 and it was working quite well without any troubles. Suddenly, I found a hindrance on my path. I used RB4 and RB5 pins as I2C bus pins for communicating with an EEPROM ...
1
vote
1answer
38 views

How to use k150 pic programmer on Linux?

I'm trying to start with PIC microcontrollers. I bought this programmer: http://www.kitsrus.com/pdf/k150v2.pdf and a 16F628A. But I'm not able to use it with my Arch Linux... How can I do that? Thx ...
2
votes
1answer
53 views

PIC32MX795F512H UART1 interrupt problem

I know this topic has already been brought up and I have been going through those posts but I still can't get my UART1 RX interrupt working. What I am trying to do is receive the NMEA string from my ...
-1
votes
2answers
74 views

Can I use math functions in PIC16F877A code?

Can I use exponential (exp) math function in PIC16F877A code? For example like this: double a,ans; a=5.7; ans=exp(0.5);
0
votes
3answers
36 views

Globlal Variable Problem: Pic18f4550 and Pickit3 Debugging

I'm working on a project which includes the usage of the A/D converter module in the micro-controller (pic18f4550). I haven't had any problems in the past with the micro-controller using a pickit3 ...
-4
votes
1answer
58 views

Does this cart look like a good starterkit to start programing microcontrollers? [closed]

im starting to program microcontrollers, and gathered a list of components that im thinking of buying just to get started. Do you think itd a good starting package ? ...
4
votes
3answers
169 views

What is the PIC micro controller naming scheme?

I've been dealing with the PIC micro controller for a while and as the question says I want to understand the naming scheme for each PIC line (8- 16- and 32-bit PIC). For example what is the ...
0
votes
1answer
44 views

In PIC24 programming, why does AD1PCFGL = 0xFFDF mean assigning analog to AN5?

I know 0xffdf is a hexadecimal number, but why does the instruction AD1PCFGL = 0xFFDF; mean assigning analog to AN5? What has 0xFFDF to do with 5? How are they ...
1
vote
2answers
101 views

Approach to 8 channel bit banging

I'm looking at controlling some WS2812 5050 RGB LED strips from a microcontroller. I've successfully played with the Adafruit Neopixel library and I've written some code on a PIC18F2455 which I've ...
1
vote
0answers
67 views

Sending data C# to PIC by using USB

I want to send data, C# to PIC by using USB (UsbLibrary.dll). I am using below codes for sending data; ...
3
votes
1answer
74 views

SLEEP or busy-waiting. Which would service an interrupt faster?

I'm programming a PIC microcontroller to service two events via interrupts on a very time constrained environment. PIC microcontrollers allow a SLEEP mode which wakes the PCU on any external ...
1
vote
1answer
40 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
79 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
52 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
106 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
51 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
45 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
74 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
114 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
106 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
120 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
58 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
113 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
81 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
97 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
108 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
52 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
47 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
87 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
44 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
76 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
43 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
50 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
54 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
65 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
391 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
117 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
112 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
2answers
68 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
83 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 ...