Questions tagged [pic]

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology.

PIC is a family of modified Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller". wikipedia


For questions regarding Position-Independent Code, use instead.

1624 questions
0
votes
1 answer

Struct pointer assignment

I'm trying to pass a struct to a function (by reference) and set several values of the struct in that function. Here's the struct: struct Sensor { BYTE accel_data[6]; BYTE gyro_data[6]; int ax; int ay; int az; int gx; int…
Jacob Sharf
  • 250
  • 2
  • 12
0
votes
3 answers

C30 PIC Compiler won't compile (MPLAB-X IDE)

I am trying to compile a very simple program, I dont understand why it doesn't compile. Here is my program: /* General includes */ #include #include #include #include #include…
Andres
  • 6,080
  • 13
  • 60
  • 110
0
votes
1 answer

Migrating code from a PIC18F2480 to a PIC18F2680 Microcontroller

I have bootloader code written in MPLAB for an 18F2480 processor. My current project requires me to upgrade the microcontroller to an 18F2680. (The main difference between the two chips is that the 2480 has 16K of program memory/768B RAM/ 256B…
faul
  • 227
  • 2
  • 4
  • 13
0
votes
1 answer

PIC16: self-modify code

On a microchip PIC16 microcontroller I have a program of the sort: off = 2; period = 10; while (1) { if (counter == 1) { switch something on; }elseif (counter == off) { switch something off; }elseif (counter == period) { …
ARF
  • 7,420
  • 8
  • 45
  • 72
0
votes
1 answer

itoa and uitoa usage

I'm using PIC-Web's thermistor to read the temperature in the room for a project. I have to comment the code to show that I undersand it. I understand the first part of the code (I think) but the second not so much. This is the code: void…
Pascan Sorin
  • 41
  • 2
  • 10
0
votes
1 answer

PIC 16F88 ADC example?

So I have a PIC 16F88, and I managed to do a couple things with it, but now I was wondering how to get analog to digital conversion? I've tried many examples out there in the internet, but no success :( if anyone could give a light on how to use the…
RicardoE
  • 1,665
  • 6
  • 24
  • 42
0
votes
1 answer

GPS SD Card Data Logger in 16F819 raw type issue

I did a GPS data logger application with PIC 16F819, my sd card format type fat32. i run my application and sent gps record to sd card.then, i couldnt see any text file or file. it saved it probably native raw type. I used a hex editor but this is…
UsTa
  • 329
  • 2
  • 5
  • 10
0
votes
1 answer

PIC 18f4685 and Hitatchi 44780 LCD

Anybody have some sure to work 4-bit interface C code for a PIC 18f4685 to Hitachi LCD 2-line display? I'm using a Northmicro proto board with a LCD module which is Hitachi 44780 compatible. Lower nibble on PORTB to D4-7;…
Chef Flambe
  • 885
  • 2
  • 15
  • 35
0
votes
1 answer

Adding a "delay" section to LED clock on PIC16F684?

Okay, so I've written a .asm to manipulate 3 LEDS, but I did it a long time ago and am very rusty on the commands / structure. I can't even figure out what exactly this script does! As far as I can tell, it counts in binary from 0-7 (3 LEDs = 0-7?).…
Jake Lee
  • 7,549
  • 8
  • 45
  • 86
0
votes
1 answer

No interrupts being triggered in UART Receive on PIC18F2680

I have been working with this code for days and cannot figure out why my interrupts are not being triggered. I know data is coming through successfully because I used a probe on a logic analyzer, also my baud rate is correct as I can transmit with…
J2N
  • 321
  • 4
  • 19
-1
votes
1 answer

PIC's working registers and CPU registers

I completed a university course called "Microcontrollers: Programming and Interfacing" in which we studied the PIC24F microcontroller, specifically PIC24FJ128GA010, as a computer engineering course. My CS counterparts did a course studying the 8086…
-1
votes
1 answer

Need Help Understanding Some Of The code For Receiving and Decoding an Infrared Receiver

For the most part i can follow this code but i cant seem to grasp how the final 8-bits are constructed, see my comments below: Original code web page see for more information while(ir == 1); INT0IE = 0; while(ir == 0); TMR0=0; …
derill03
  • 1
  • 2
-1
votes
1 answer

I can't find the problems in my dc motor controller

I am having trouble finding a problem with the code, it's supposed to be in C language and I'm using a PIC16F877A and an L293D motor driver IC. Here's the code: #include #include #include "config.h" #define _XTAL_FREQ 4000000 //--[…
Abdou
  • 1
-1
votes
1 answer

How do I correctly send an int to the UART Buffer on a pic32?

I am receiving strange results on my pic32 and I am not clear what have I did wrong. Using a logic analyzer I have confirmed that the slave is replying with 0xA3. I also did a test with an LED to see if "test == 0xA3" and the result was true. ut…
-1
votes
4 answers

How do I get a function to be compiled at address 04 with GPLINK? (For PIC16)

I have a function which is meant to catch all the interrupt calls that will happen, But I cannot get any function to start at address 04. Note: I dont want to use functions that are specific to interrupt types, I dont want the overhead they produce…
user1598585
1 2 3
99
100