PIC is a brand of 8, 16, and 32 bit RISC microcontrollers manufactured by Microchip. "PIC" originally was an acronym for "Peripheral Interface Controller".
39
votes
9answers
3k 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? ...
38
votes
9answers
2k 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 ...
36
votes
6answers
8k 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 ...
23
votes
4answers
3k 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 ...
22
votes
5answers
6k 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 ...
15
votes
2answers
737 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 ...
15
votes
5answers
3k views
PIC Microcontroller Programming on Mac OS X
How can I start PIC Microcontroller Programming on Mac OS X. Can I use an Arduino connected to my Mac has a programmer? Or do I need to buy specific programmer board and serial adapters?
13
votes
9answers
7k 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 ...
13
votes
7answers
4k 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 ...
11
votes
7answers
4k 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 ...
11
votes
5answers
695 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 ...
11
votes
4answers
3k views
Is it possible to use AVR ISP programmer to program a PIC chip?
I want to try programming a PIC chip and just see, how much different it is compared to an AVR, what are the differences and so on. I've got an AVRtinyISP and would like to know, if it would be ...
10
votes
11answers
554 views
Is it really a good-practice disable optimizations during the development and debugging phases?
I've read Programming 16-Bit PIC Microcontrollers in C, and there is this affirmation in the book:
During the development and debugging
phases of a project, though, it is
always good practice ...
10
votes
4answers
2k views
Best PIC programmer?
I would like to start using PICs in my projects and was wondering which programmer I should get. I have plenty of experience using micro-controllers (68k, avr), I also have lots of experience with ...
10
votes
3answers
616 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 ...
10
votes
3answers
1k views
Selecting a network layer over CAN bus
I am planning on using CAN bus in an industrial automation application, however I'm having a hard time deciding how to implement the network layer. Does anyone here have any recommendations for a ...
10
votes
5answers
3k views
Battery life monitor on PIC circuit
I have a small circuit using a PIC18F14F50 microcontroller chip which is logging data into an external EEPROM chip over an i2c interface (which I can then read back later over the USB interface). One ...
10
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 ...
10
votes
2answers
659 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 ...
10
votes
1answer
2k views
PIC18F4550 C-compiler that's open-source & cross-platform?
I'm a long time AVR user. I really like that AVR-GCC works on the two main OSes I use (Mac OS X and Linux), is open-source, and is supported by Atmel. I'd like to get back into PIC programming (used ...
10
votes
2answers
965 views
Generating PAL tv signal using a PIC
I'm trying to generate PAL tv signals using a PIC24FJ64GB002 using a similar method to the circuit described half way down this page. The only difference is that my circuit needs to run at 3v instead ...
9
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 ...
9
votes
5answers
2k 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 ...
9
votes
6answers
3k 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 ...
9
votes
2answers
312 views
Does pin order matter at all for this RAM?
I am trying to route a pic32 chip to a 128kB SRAM chip and having a bit of a hard time getting all 17 address lines and all 8 data lines connected. I am trying to tie the first 16 address pins to ...
9
votes
3answers
581 views
Replicating a Magstripe?
I want to work on a project where you could replace a magstripe with another item which can change the data stored on it via a PIC but still be read by a magstripe reader. This means that the PIC ...
8
votes
7answers
3k views
Use of malloc in PIC
How can I use malloc() and free() functions in a PIC?
I've checked the stdlib.h header and ...
8
votes
1answer
297 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 ...
8
votes
6answers
3k views
Arduino or PIC microcontroller?
I was thinking of creating a surveillance mobile robot. And I am having a problem of choosing a PIC or a Arduino microcontroller. The surveillance mobile robot is controlled via wireless fidelity ...
7
votes
5answers
2k views
MD5 implementation for microcontroller
Does anyone have any examples of the MD5 algorithm for a microcontroller (preferably an 8-bit one)? Our project is going to use a Microchip PIC18 series device.
7
votes
2answers
519 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 ...
7
votes
3answers
579 views
Entropy Source on Microchip PIC24F
I am working to develop an Android accessory hardware. Currently, I am trying to generate an random number (C language) on a embedded system, but the value doesn't change. I am wondering if there is ...
7
votes
2answers
336 views
avr microcontrollers and how to get started coding init or main loop or timers or interrupts
I have been modifying AVR and PIC microcontroller code for a few years now for work but have never written anything from scratch, I understand it pretty well.
I am starting to write my own code now ...
7
votes
2answers
163 views
Need some help understanding PIC memory map
Some background. I use MPLABx with a PicKit2 to program different types of pics. At the moment its the 16F887. I try to stick to the Hi-Tech PICC Lite tool chain but I'm growing increasingly unhappy ...
7
votes
2answers
432 views
Large array in C18 causes device reset
I am using the PIC18F13K22 and Microchip's C18 compiler in MPLABX. The PIC kept resetting, when it was about to jump into the interrupt service routine (ISR). I was able to trace the problem down to ...
7
votes
3answers
1k 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 ...
7
votes
4answers
285 views
Can individual pins of different port of a microcontroller be mapped to a register and their values be changed when changing the register value?
Q: Can individual pins of different port of a micro-controller be mapped to a register and their values be changed when changing the register value?
Scenario: I have used up some pins from each ...
7
votes
2answers
76 views
Detecting overflow with C18
I'm implementing a calculator in a microcontroller which is controlled over the serial port. For example, I'd send 1234*5678= and it would reply with ...
7
votes
1answer
108 views
What is slew rate for I2C?
I'm configuring I2C on a PIC18 using the built-in functions of the C18 compiler as described in section 2.4 of the documentation:
...
7
votes
3answers
346 views
Absolute address of a function in Microchip XC16
Device: dsPIC33FJ128GP802
I have some *.s files as follows
...
6
votes
3answers
375 views
What does #if 0 do
Today I started to use MPLAB X to program my PICs, and found a code template, with multiple files and spots to fill in code. Before I have had a single file with my code in it. In this template, where ...
6
votes
6answers
2k 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
4answers
1k views
Reading a 16-bit timer on an 8-bit MCU
Since an 8-bit MCU can't read the whole 16-bit timer in one cycle, this creates a race condition where the low-word can roll over between reads. Does the community have a preferred method of avoiding ...
6
votes
3answers
255 views
Switching from PIC to AVR [closed]
I have worked with PIC16 and PIC18s for over three years now and would like to get to know AVR as well. I have no specific project in mind, but would like to try around with the different ...
6
votes
2answers
1k 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 ...
6
votes
5answers
1k views
PIC 16F beginner.. difference in program-syntax when using different compilers
As I mentioned, I have just beginned programming pic16f877a. I can now work with 7 segment displays. At present I am using ccs compiler. Nothing wrong with that. But i prefer to be a compiler ...
6
votes
6answers
1k views
What is the reason my PIC16 multitasking RTOS kernel doesn't work?
I am trying to create a semi-pre-emptive (co-operative) RTOS for PIC x16 microcontrollers. In my previous question, I've learnt that accessing hardware stack pointer is not possible in these cores. I ...
6
votes
5answers
1k views
SRAM which two chips can read/write
I'm looking for a small, 32KB or so SRAM device that two MCUs can read or write (at two different times; I don't need simultaneous reading/writing.) It would be good if it used a serial interface as ...
6
votes
4answers
1k 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 ...
6
votes
2answers
1k 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 ...