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)

31
votes
6answers
11k views

How do I measure a negative voltage with a ADC?

I am working with a PIC micro-controller with inbuilt 10bit ADC and want to measure a voltage in the range of -1 to -3Volts. I thought of using an op-amp in the inverting mode to make voltage positive ...
19
votes
8answers
11k views

Fast and memory efficient moving average calculation

I'm looking for a time and memory efficient solution to calculate a moving average in C. I need to avoid dividing because I'm on a PIC 16 which has no dedicated division unit. At the moment, I just ...
6
votes
6answers
3k views

How do I sample a -2 V to +2 V analog signal with a PIC microcontroller?

I am using a PIC micro with a 10bit ADC to take readings from an analog signal with a frequency less than 300 hz. However that analog signal is in the range of -2 V and +2 V. How can I condition the ...
6
votes
2answers
2k views

PIC voltage measurement

I am running a battery powered device, and would like my microcontroller (PIC) to report on the supply voltage. This is so I can determine how many batteries is used in the supply, and also the state ...
8
votes
1answer
450 views

How to dual power PIC18F4550?

In the datasheet there is this shematic how to dual power 18F4550. However they don't specify which transistor to use and what resistor values have to be. For capacitor I use 100uF (diode side) and ...
3
votes
2answers
1k views

Interfacing a keypad with a microcontroller

I am using a PIC16F877A, running at 20 MHz. I have two paralleled, 3 columns, 4 rows keypad. My setup is as follows: KR1 to KR4 are rows, KC1 to KC3 are columns, and they all go to the ...
52
votes
6answers
14k views

What is the difference between a DSP and a standard microcontroller?

I understand that a DSP is optimized for digital signal processing, but I'm not sure how that impacts to the task of choosing an IC. Almost everything I do with a microcontroller involves the ...
9
votes
3answers
2k views

How do you Calibrate 32.768kHz crystal for PIC24 RTCC

I'm trying to figure out the best method for PIC24 RTCC crystal calibration. Their application note states two methods: using a lookup table and using a reference system clock. According to them the ...
11
votes
5answers
3k views

If a PIC MCU provides multiple Vdd/Vss should you provide power to them all?

Take a look at this example schematic: The chip in question is the PIC18F4550 and as you can see power is provided on both sides (with a 100nF cap to smooth noise I guess). Is this strictly ...
7
votes
3answers
1k views

EEPROM read/write errors on dsPIC

I'm running a Microchip dsPIC30F6012a. I have this chip on several PCBs, all running the same software, and observe the same problem on all of them. This implies a systemic problem, not a one-off ...
4
votes
4answers
1k views

Maximum attainable delay with Micro controller

I am designing a microcontroller based delay circuit to implement delays of 2 hours, 1 hour, 45 minutes, and 30 minutes. The circuit will automatically turn on off a relay after this time period has ...
0
votes
4answers
231 views

How do I get started with PIC programming? [closed]

So I opened up a big bucket o' worms asking this question. Two of the answers mentioned that instead of using a 555, a PIC10F200 or PIC12F675 may do the trick. Now, I've been spoiled with Arduino's ...
26
votes
6answers
6k views

Smallest AES implementation for microcontrollers?

Can anyone recommend a small, free implementation of AES-128 Rijndael for microcontrollers. Ideally, for the PIC18, though a general implementation in C would be useful. Compiling the axTLS ...
14
votes
6answers
4k views

Wireless communication between more than two Microchip PIC microcontrollers

I would like to create wireless communication between Microchip PICs for my simple project. It's actually an one way communication but there is one server and more than one client (about 2-4, all ...
12
votes
6answers
2k views

Starting out PIC Programming

I've been looking into doing some PIC Programming, but unlike some of the other microcontrollers available the sheer number of different chips available has caused me some confusion. It also appears ...
7
votes
2answers
3k views

What happens when data is written to LATCH?

This is what I found in PIC16F1947 data sheet: Reading the PORTB register reads the status of the pins, whereas writing to it will write to the PORT latch. All write operations are ...
7
votes
2answers
877 views

Seemingly unstable basic PIC18F2550 circuit

From my work I've had quite a bit of experience with hardware development, but purely from a supervisory role, and so recently I've been playing around with ground up MCU circuit design to try to get ...
5
votes
3answers
10k views

Starting with I2C on PIC18s

For a project I'd like three PICs (two slaves PIC18F4620, one master PIC18F46K22) to communicate over the I2C bus. Later on, more slaves may be added (like EEPROM, SRAM, ...). I'm writing the code for ...
3
votes
1answer
2k views

SD Card Interface with Pic Mcu - Part_1

I am trying to interface micro SD card with PIC MCU using SPI-mode of SD protocol. Being a beginner, I tried to get the R1 response from the SD card by sending the command '0' through SPI ie., ...
5
votes
4answers
717 views

Books about pic18f? [closed]

Could someone suggest books on PIC18F for me, I used Gaonkar for my classes, and I found Muhammad and Huang to be great references.
4
votes
4answers
2k views

Problems communicating with I²C RTC

I'm using PIC18F4680 to work with PCF8583P RTC using C18 compiler (and compiler's library functions for hardware \$I^2C\$) and I can't figure out how to read data from it or to determine if written ...
3
votes
1answer
418 views

I'm buying my first PIC, what kit do I need?

So I'm probably going to buy a dsPIC33F to build a synth with. I've used Atmel micros in the past, but this will be my first PIC chip, I wanted to know if there's anything in particular I need or ...
2
votes
2answers
417 views

Internal pullup for input in PIC microcontroller

Im new in PIC world. I want to ask: Do I need external pullup resistor for switches and encoders? When I was using Atmel microcontrollers - I was just turning on internal pullup resistors in ...
0
votes
0answers
69 views

Which would be the best option for driving the 3/4 axis stepper motor for 3D printers?

I have researched a bit over google and reprep websites and come across different circuits/methods to drive the stepper motors. Being a student only , I have budget issues and I want it to be less ...
19
votes
2answers
2k views

C coding design - function pointers?

I have a PIC18F46K22 and program it with the XC8 compiler. In the end, I'll have a system like a pc with stdin and stdout. So in ...
6
votes
4answers
321 views

Will an SPI flash memory chip have the same issues with non-atomic write operations as a dsPIC's internal EEPROM?

A while back I had some intermittent trouble with the internal EEPROM of a dsPIC. Every so often, some value in the EEPROM would be found zeroed out on power-on. I tracked the problem down to when the ...
5
votes
4answers
2k views

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port?

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? I can work around this problem by writing a byte to the entire port, ...
4
votes
3answers
2k views

What is meant by Input clamp current/Output Clamp current in micro controller datasheet?

While reading a PIC data sheet, I found the parameters Input clamp current / Output Clamp current. Where do I consider these specifications?
3
votes
3answers
345 views

Reading frequencies without filters

Is it possible to read a set of frequencies with a PIC in such a way that for each frequency a different function is called? The idea was to send multiple frequencies at different times (no ...
2
votes
1answer
188 views

Selecting a transceiver module for a wireless communication system [duplicate]

Possible Duplicate: Suggestions for a Point-to-Point reliable Wireless Communication Module I got a project to design a wireless communication system in order to communicate between the ...
0
votes
3answers
1k views

Sending Via PIC18F97J60 EUSART

When trying to send and receive using a PIC18F97J60 and MAX232 using a program written with the C18 compiler, I am only able to transmit data. For receiving, I have tried at least 50 methods but none ...
-1
votes
2answers
99 views

Servo connected to PIC does not work

I have a PIC 12F629 and I connected it to my servo (TowerPro sg5010 motor) per these details: PIC pin 1 to positive pin 8 to negative pin 2 to servo red wire (signal) servo brown wire to negative ...
-2
votes
1answer
482 views

USB host to host connector with PIC18F2550

I'm working on project to design a usb cable between two PCs with PIC182550 as controller.How can I connect both the PCs since there is one USB interface in the PIC?
46
votes
9answers
3k views

RTOS for Embedded Systems

I have seen many articles that tell me I should be using RTOS for time management and resource management. My time has not permitted my own research, so I come to chiphacker for advice. I use low ...
47
votes
9answers
5k views

How can anyone use a microcontroller which has only 384 bytes of program memory?

For instance a PIC10F200T Virtually any code you write will be larger than that, unless it is a single purpose chip. Is there any way to load more program memory from external storage or something? ...
16
votes
9answers
9k views

Ideal WiFi to Serial (or SPI) bridge?

What are some recommendations on an ideal WiFi to Serial bridge? My ideal qualities would be: Simple connectivity, SPI or Serial Reasonable fast speed, at least 1mbit/sec ideally (though probably ...
6
votes
4answers
2k views

Embedded System that is able to connect to the internet

I am thinking about starting a project and was just looking for some general input. Where I work our company currently have remote stations that take data in from a radio link and input the data to a ...
4
votes
3answers
6k views

How do I modulate PWM frequency in realtime with a Microchip dsPIC?

I'm trying to change the PWM output frequency roughly once a millisecond using a dsPIC33FJ256GP710, and I'm having mixed results. I first tried this: ...
5
votes
3answers
784 views

GND difference between CAN nodes?

I am running a short (2 m) CAN bus with about 20 nodes. 1 Mbit/s speed, PIC 18F2580s and 18F4580s with MCP2551 transceivers, 10 MHz (with PLL to 40 MHz) crystal oscillators. Both ...
13
votes
1answer
4k views

How to measure pulse width of an IR signal using an 8-bit PIC?

My friend and I want to design a universal learning remote controller, like this one, for learning purposes. What we want to do basically is store and replay infrared pulses. We want to detect 36kHz, ...
12
votes
10answers
2k views

Execute instructions from RAM in a hobbyist-friendy microcontroller

One of my projects would greatly benefit from being able to run a program that isn't stored in the microcontroller (but is instead stored in a SD card). So, I'm looking for a device that will allow ...
12
votes
5answers
792 views

Is an FPGA viable for such a project?

I am currently working on Super OSD - an on screen display project. http://code.google.com/p/super-osd has all the details. At the moment I'm using a dsPIC MCU to do the job. This is a very powerful ...
12
votes
2answers
1k views

Compiling code to run from external RAM

I am considering designs for a minimalist game system based on a PIC18F85J5. Part of my design is that games can be loaded from an SD card without reprogramming the chip or flashing the program ...
5
votes
2answers
6k views

C/C++/C# programming for interfacing USB to PIC microcontroller

I am a computer sciences student looking to do some PIC microcontroller programming for some small home projects . I am fluent in C/C++/C#/Java and i also have an understanding of programming ...
3
votes
1answer
949 views

PIC18F4520 ADC Conversion in MC18

I have a dilemma. I need to read ADC values from PIC18F4520. My configuration, and code, is as follows: ...
3
votes
4answers
1k views

Can i implement a wireless connection between an embedded system and a mobile phone?

I'm trying out an automation system, and i was wondering if it is possible to communicate over, say WIFI between a mobile application and an embedded systems based arduino ethernet shield or microchip ...
2
votes
1answer
2k views

What better options are there than the LM1893 for powerline communications?

I'm looking to build a home automation system which uses the powerline to carry the data between nodes. I have an old design based on a combination of LM1893, HC123 and 8748, but the slave board is ...
15
votes
7answers
5k views

Should I get the PICKit 2 or 3?

Okay, having decided to pitch myself at the PIC family (including dsPIC), I now have a question about programmers. I've been hearing a lot of bad things about the new PICKit 3, and am wondering if I ...
12
votes
3answers
1k views

Attaching a LED to PIC's Rx pin

I need some way to know whether the microcontroller (PIC) is receiving (or transmitting) any data. So I thought of keeping a ...
7
votes
3answers
1k views

How to implement simple stack switching in PIC12/16 cores?

I am trying to understand how real time operating systems work. I have looked at the source codes of some RTOSes. I want to learn by creating my simple RTOS, something like FLIRT. I am using PIC16 ...