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
1answer
35 views

Trouble holding MCLR line low for PIC ICSP, ICD3 works, hardware defect?

I have an ARM Cortex-M3 that talks to a dsPic33F. I am attempting to do ICSP programming of the attached PIC. I have an analyzer and can see that I cannot control the MCLR line the same way the ICD3 ...
0
votes
2answers
47 views

What is the difference between debug mode and normal execution on dspic?

I have a dspic33fj128mc802 microcontroller. I am using mplabx and xc16 compiler. I have my internal oscillator set up to 80MHz. I have managed to setup FreeRTOS on the device and everything compiles ...
1
vote
2answers
57 views

How to find duty ratio of a PWM using input capture?

I have a controller PIC18F and it supports input capture peripheral. I understand it can be used to find the frequency of the incoming signal. How can the duty ratio of PWM can be obtained from the ...
0
votes
3answers
65 views

I'm trying to implement interrupt from RB pins. But it doesn't work

I'm new to PIC programming. I made a program to get interrupt from RB pins. but it doesn't work. My code is as follows: ...
1
vote
0answers
35 views

Two functions in the high priority interrupt

I'm using the PIC18F46k22 mcu and I'm using two function in my high priority interrupt routine: ...
0
votes
1answer
46 views

How come the value in my RAM of DS1307 RTC become zero?

I'm using the 56 bytes of RAM in the DS1307 to store some data. My DS1307 is connected to the PIC18F46K22. But after running a few days, all the data inside the RAM will suddenly become zeros. The ...
0
votes
4answers
69 views

Wiring up an LCD display with unknown controller

I found an old LCD in my pile of trunk. I would like to be able to use it. However, someone (possibly / probably me) sawed off the part of the PCB with the series code, so I can't know what the ...
1
vote
3answers
74 views

Returning from interrupts at a different location from where the interrupt occurs. (PIC16F877A)

Is there a way to return from interrupts at a different location from where the interrupt occurred in Microchip PIC16F877A? I have a problem where I need my code restarts at a specific point always ...
1
vote
1answer
64 views

When setting pin as input it getts pulled high, why?

I've hooked up a push button to GP1 and a LED to GP2 on my PIC12F683 and this is my code: ...
0
votes
1answer
26 views

Unexplained behavior pic port b on change interrupt

I am trying to configure the port b interrupt on change interrupts to work with a program I am writing with MC XC8 demo version. I am using a PIC16F628A I am using this code to initialize the pic for ...
0
votes
1answer
87 views

Best microcontroller for industrial applications [closed]

I have an industrial project requirement to build a device having this functionality: Store Data Send Data to Web Server Device to be placed under scorching sun Sensors - around 5 A Graphical ...
1
vote
1answer
43 views

Using GPIO mode in SIM908

I'm working on a SIM908 module using GPIO mode (my rx pin contact is lost when soldering). I have interfaced it with a PIC16F73 and while using GPIO mode I'm not getting any response. I have included ...
1
vote
2answers
67 views

Catch both sides of a clock change PIC interrupt

I am trying to build an IR remote receiver using a PIC16F628A. To do that, I need to catch both the falling and rising edge of the external interrupt pin. From the datasheet it appears you can only ...
3
votes
1answer
95 views

PIC16F628A Blinking LED

I was setting up a PIC16F628A for a simple Hello World program (blinking LED) and somewhere in the process, I have failed. The LED stays lit at the specified pin and does not "blink". I am using the ...
0
votes
1answer
67 views

SD Card Access Library

I am accessing my SD card using SPI. But I've found this to be slow and I am also sad that when there is a faster protocol already supported by my SD card I am using a slower version. Is there a C ...
0
votes
0answers
59 views

Generating and measuring PWM

Description of the main part of my project: A microcontroller should read 4x PWM channels, that come from a RX1. The frequency of the PWM signal is fixed (about 50Hz), the high time of the pulse is ...
2
votes
2answers
77 views

Digital out, output low voltage, no load

I'm controlling a home-built current regulator, using a PIC microcontroller (PIC12F1572). The regulator is implemented using an op-amp and mosfet, and works well. The input to the regulator is a ...
0
votes
1answer
49 views

Gettinc MCLR error in Proteus on PIC18 in a really simple circuit

I'm simulating this circuit below in Proteus 8.1. It basically consists of a switch that, when pressed should send a signal to port A, and then port B should light a LED. I am using PIC18F4550, and ...
1
vote
2answers
329 views

PIC18F2550 Loop Counter Overwritten by sprintf

I have the following code compiled with Microchip's MPLab and XC8 compiler and running on a PIC18F2550 which is doing something rather odd: ...
0
votes
3answers
111 views

Microchip PIC - How to recover the context saved in interrups or disable the automatic saving of the context?

I'm building a dispatcher for PIC microcontrollers to switch tasks saving their contexts. The dispatcher is triggered when an interrupt occurs. The problem is that the compiler I'm using (C18 V3.x) ...
0
votes
1answer
95 views

PIC resets when motors work

I'm using a PIC18F452 in my project, and L293d for driving motors. I'm using two completely separate power supplies for driving motors and driving the PIC. completely separate two power packs. a 12 v ...
1
vote
2answers
97 views

Microchip XC8: How to Overlap Specific Variables without Union?

I have effectively three sets of variables to put in two locations. Sets 1 and 2 are never used together, so they can occupy the same space. Set 3 needs to be unique. I know I can use a union of ...
1
vote
4answers
189 views

Function Pointer in C Language

I'm facing a little problem with function pointers in a code for the microcontroller Microchip Pic 18 Series. The code below shows the prototypes of the functions involved in the problem and a call ...
0
votes
0answers
41 views

pickit3 connected to pic18f4550

I am using pickit3 to program pic18f4550 I build the circuit but still there are some problems outcomes from the output window from both mplab ide v8.60 and mplab ipev2.20 the window outputs : 1- ...
0
votes
0answers
44 views

How can I use the OSC2 pin as normal IO on a pic32mx150f128b?

Everything else works well, the CPU runs at 40 MHz, UART works, GPIO works; the OSC1 pin works as GPIO as well. But I cannot use OSC2 as GPIO. I am using the Fast RC oscillator with divide-by-N and ...
0
votes
0answers
39 views

dspic33 ADC alternative MUX problem

I'm trying to sample from 8 channels using my dspic33fj128gp802 chip. I've had four channels working fine up until now, but trying to use the alternative MUX switch isn't going to plan. I've tried ...
3
votes
1answer
73 views

Android Microchip Accessory Development Starter kit PIC24F

I have the PIC24F Android Accessory Development Starter Kit from Microchip. I am running Android 4.4.2 on a Samsung Galaxy S4, however I am unable to get the phone to recognize the USB device when ...
1
vote
3answers
99 views

Can I use a PC Microphone in a PIC with ADC?

I want to do an FFT on some music, I found an electret board so connect directly to the ADC port, but I was wondering if it's possible to use a normal computer microphone, anyone know a tutorial or ...
0
votes
1answer
290 views

PIC16f xc8 compiler : unknown pragma “code”, “interrupt”,“chk_isr”

Lately I've been trying to interface HC-SR04 with PIC16F877A using capture mode and interrupt but am getting "Warnings" and I've pasted the code below: Compile output: ...
2
votes
2answers
77 views

Making variable delay routines

I know how to write accurate delay routines in assembly to run on a PIC microcontroller. The problem I have is creating delays of a arbitrary length. What I want to do is accept some data which ...
0
votes
0answers
60 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
838 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
124 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?
2
votes
2answers
56 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
49 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 ...
0
votes
1answer
56 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
41 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
164 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
121 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
185 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
123 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
64 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
93 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
47 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
64 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
206 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
47 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
116 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
93 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
82 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 ...