Questions tagged [pic]

PIC is a brand of 8, 16, and 32 bit RISC microcontrollers manufactured by Microchip. "PIC" originally was an acronym for "Peripheral Interface Controller".

265 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
209 views

Mplab X IDE insists I'm trying to change protected boot memory even though all CodeGuard options are disabled

I'm new to this whole thing, so forgive me if I'm missing something obvious, but the only relevant thing I could find is over 9 years old, using a different programmer and different PIC. I'm using ...
3
votes
2answers
508 views

Having a problem programming the UART and the PPS for my PIC24F

I want to do a simple project with my PIC24FJ1024GB610, where I use the UART1 module and transmit character 'a', the Transmitter pin is connected to the Receiver pin of the PIC24F, if the receiver ...
3
votes
0answers
2k views

Dumping contents of read-protected PIC

I have a need to read out the flash memory of a read-protected PIC16F57 (this is for legal purposes). From my basic research, there appears to be no way of doing this short of decapping it and reading ...
3
votes
1answer
153 views

PIC16 - MSSP Peripheral I2C Master Halting In Middle of Clock Sequence?

I'm using a single PIC16F18857 as an I2C master to talk to five PIC16F1615's on the bus. All is working great, for the most part, however, I've been experiencing a "lock up" where the master is stuck ...
3
votes
0answers
578 views

OLED display using dspic33f i2c

I am trying to use OLED display in a dspic33f microchip. I've successfully initialized and sent data using I2C to OLED. I managed to display a small font(8pt) on the OLED. However, when I tried a ...
3
votes
0answers
1k views

What's up with my 74HC4052?

I am using a TI 74HC4052E to multiplex a TTL UART on a Microchip PIC32MX695F512 microcontroller. The expected behavior is for the TX and RX signals to pass through the switches unaffected; sadly ...
3
votes
0answers
530 views

dsPIC: Link assembler project with XC16 in command line mode

I have an assembler project that compiles and links fine with MPLABX. Now I am trying to build it from the command line. Attempt to use the command line from MPLABX fails. When I am calling: C:\...
3
votes
1answer
2k views

I2C Raspberry Pi to PIC24F

I'm new to PIC's and PIC programming but I'm working on a little project to try get a PIC24F32KA301 to communicate with a Raspberry Pi using I2C. The Raspberry Pi is the master and the PIC is the ...
2
votes
1answer
141 views

Debugging PIC16F886 with PICkit4

MCU: Pic16F886 Programmer: PICkit4 IDE: MPLAB X IDE v5.40 Assembler: pic-as v2.30 (xc8) Circuit: A LED with 270 ohm resistor on RA0. 3,3k ohm resistor pullup resistor on MCLRE. Vdd on pin 20. ...
2
votes
1answer
289 views

PIC32 DMA (connected to SPI) interrupt not working

I am working on my first PIC32 project on a custom board. I am utilizing a PIC32MZ2048EFH064 microcontroller which I am programming in MPLAB X IDE v5.40 (compiler: xc32 v2.41). My goal is to receive ...
2
votes
0answers
631 views

PIC programming with command line

Has anyone programmed a PIC using the command line interface with a batch? I have Pickit 4 and I've tried this: ...
2
votes
4answers
2k views

How do I perform division of two numbers in PIC16F877A in assembly language?

I'm currently using MPLABX IDE to develop for a PIC16F877A microcontroller. I want to divide two numbers and find out the quotient (let the two numbers be 10 and 4) and store in a register. I was ...
2
votes
1answer
692 views

PIC32MX UART Interrupt Not working

I am writing a program to send data from one microcontroller and receive the data using on another PIC32 microcontroller and display the received data on LCD. I am using UART2 of both PIC32MX to send ...
2
votes
0answers
314 views

dspic30F2020 read two ADC channels

I'm working on dsPIC30F2020 to read two analog channels sequentially on AN0 and AN1. But all I got is only the value from AN1, so what's wrong with my codes below? Thank you very much for the help <...
2
votes
1answer
334 views

PIC16F1783 Inclinometer Project using Accelerometer 12-bit ADC issue

I am working on an inclinometer project using an accelerometer, MMA1220KEG and a PIC16F1783, it is designed to switch a relay when the angle of inclination is below 15 degrees and illuminates a series ...
2
votes
1answer
591 views

Microchip PIC24's DMA doesn't work as expected

I am trying to configure the DMA in Microchip's PIC24FJ1024, DMA channel will transfer Data, from Source to Destination, every time the program trigger the DMA Channel. One Shot Mode SRC increments ...
2
votes
0answers
123 views

EEPROM in Simulator for Microchip Pic18f

When programming a Microcontroller from Microchip using Pic18F and using XC8 Compiler, can i use Simulator to test / verify it ? ...
2
votes
0answers
118 views

PIC32MX350F256 Errata , IO open Drain Issue

In one of our Product we used Microchip micro controller “ PIC32MX350F256L”. Attached image is small part of circuit showing uC interfacing with a SPI device. We are using bit banging communication ...
2
votes
0answers
238 views

PIC 16F877A interface with glcd LM12864DDY

I'm using the CCS C Compiler to program my PIC 16F877A to display results of a voltage measurement. I'm using TOPWAY's LM12864DDY. I used the functions that were available in the glcd.c file in the "...
2
votes
0answers
170 views

Best device to read/write memory on multiple architectures?

tl;dr: I want to read/write memory from a PIC MCU and an EEPROM, both of which are soldered to an experiment board. I would like to explore programming and debugging ARM in the near future. Which ...
2
votes
0answers
375 views

pic24fj128ga310 uart not working in application, but works with PuTTY

I'm trying to connect a PIC24FJ128GA310 mounted on an Explorer 16 board with an embedded wireless module. I have been able to set up both to communicate perfectly well with PuTTY (an equivalent to ...
2
votes
0answers
1k views

Writing an emulator for a SPI like slave device (LED Driver PT6959) using a PIC

I am working with a legacy device that uses a "SPI like" protocol. This device acts like a: SPI "master", but expects to talk with only one "slave" device. It does not expect any output/data exchange ...
2
votes
1answer
255 views

UART stop bit baud timing error

On PIC micro controller UART, Baud rate was set to 38400 (No parity,, 8 data bits), ...
2
votes
1answer
672 views

Can half-bridge current limitation in BLDC Motor controller cause MOSFET destruction?

I’m developing a motor controller based on a dsPIC33EP64MC504 from Microchip. The motor is a brushless permanent magnet synchronous motor of about 500W on 50V. The controller is based on an SVM ...
2
votes
1answer
788 views

PIC32MX can't get 80 MHz Clock from Internal RC OSC

I am using PIC32MX795F512L with the internal RC oscillator. By changing the settings of the config, I can get to 60 MHz max. But I can't get to 80 MHz. When I change the config for 80&#...
1
vote
0answers
46 views

What is wrong with this PIC16F877A HCSR04 example?

I am working on distance sensor with PIC16F877A. I am using MPLAB IDE AND XC8 compiler. My goal is to gradually turn on the right leds at certain distance levels. but the leds are blinking unstable. ...
1
vote
0answers
53 views

PIC Microcontroller C program Problem.[Sequential Issue and PWM Problem]

I have just started coding PIC microcontroller in C and do not understand where the problem is. PIC10F320 is chosen for its two PWM pins, one for breathing effect on LED and the other one for 75% duty ...
1
vote
0answers
70 views

Is a dsPIC33 suitable for creating a 40 kHz signal with 16 bits of resolution as input for ultrasonic transducers?

I'm trying to build a parametric speaker (Directional speaker) that could output a somewhat decent and high-quality sound hence why I'm aiming for a 16-bit resolution. The audio signal needs to be ...
1
vote
0answers
66 views

MPLAB-X new Assembler

I am trying to assemble a old project from old MPASM on this new MPLAB-X Assembler only to end up with many errors and I have searched for usage or help and this seems to be lacking. Anyone know what ...
1
vote
2answers
67 views

PIC18 preserving EEPROM data during reprogramming

I am using PIC18f4550 microcontroller to store some data in EEPROM so that the data can be accessible after the power reset. When I reprogram the PIC with PICkit3, it seems to wipe out the EEPROM data ...
1
vote
0answers
74 views

Could a PIC18 running two functions simultaneously?

I am building a robotic car with stepper motors (for wheels) and infrared sensors(avoiding obstracles) using PIC18F4550 microcontroller. So, I have created a function to drive the stepper motor steps ...
1
vote
0answers
44 views

PIC18F4550's internal oscillator block power consumption

I started learning the PIC18F4550 recently, and I came across the internal oscillator segment where an 8 MHz internal oscillator source is divided into multiple clock signals of different frequencies. ...
1
vote
0answers
63 views

PIC32 UART Communication Wrong Characters

I am fairly new to PIC32 and am attempting to set up a very basic UART transmission to my computer through a DB9 connector. I am using a PIC32MX440F256H as my testing board. I have gotten the data to ...
1
vote
1answer
80 views

Unable to Generate PWM Signal Using CCP of PIC16F15325

I am using: Curiosity LPC dev kit, PIC16F15325, MPLABX v5.35 on Mac, XC8 compiler. I am able to blink each LED on the Curiosity. My goal is to generate a PWM signal on RC5 to drive an LED on the ...
1
vote
1answer
68 views

How can I convert an input with the 16-bit Sigma delta A/D converter

Could you help me with this question? I have some difficulties to answer it. The question is from the PIC24FJ128GC010 family datasheet and after some research I just know the meaning of the different ...
1
vote
0answers
41 views

How can I exit my lookup table routine with the desired value?

How can I get my code to work correctly when I include ADC conversion in it? I have a working code that displays two digits on 2 LED displays using a p16f1829. However, a problem arises when I try to ...
1
vote
0answers
73 views

Power Supply for PIC32

I'm working on a PIC32 design and am looking at the power supply. Currently I have a solution in mind as below. ...
1
vote
0answers
105 views

How can I improve my buzzer application using a PIC16F1829

I am trying to improve my assembly code (see below) for PIC16F1829 by using a macro to set up the parameters to play an audible sound. My previous attempt had used a macro BEEP, which has now been ...
1
vote
1answer
84 views

Audio Circuit Playback

I have an audio circuit setup currently in which a microcontroller (PIC32MM) sends PWM signals to an amplifier which is attached to some speakers in order to hear what is going on. I have attached a ...
1
vote
0answers
99 views

I2C and ADC using PIC18F2458 with MikroC

I'm using the following USB Joystick with I2C for PIC18F2458 using MikroC. Right now the USB works only if I disable the I2C. Running USB + I2C, halts on I2C1_Start(); in the Debugger and even in ...
1
vote
0answers
76 views

How can I change the "USB Serial Port" name to something else? (or serialNumber for USB)

In our system, we want to plug more than 50 devices that have PIC1846j50, connected through USB serial COM port to a computer. We are experiencing that the computer does not recognize more than 44 PIC ...
1
vote
0answers
48 views

Why is the duty cycle much wider than it should be? PIC32MZ & PWM

I'm working with the PIC32MZ2048EFM100 and XC32. I'm using some outputs as PWM signal generators. There are frequencies for which the pwm works fine, but not for others. For example to get 24.4 kHz, I ...
1
vote
2answers
64 views

Source Impedance Consideration for ADC

I recently used accelerometer ADXL335 in my academical project, this sensor gives analog output. I interfaced this sensor with microcontroller PIC18F458 using ADC module. It was successfully ...
1
vote
1answer
45 views

Sensor input calibration for wider range

I get minimum voltage output from my sensor as 2.2V and max voltage as 2.65V. I want to change this voltage to 0-5V range so that the controller ADC can calibrate input in a wider range. How can I do ...
1
vote
1answer
75 views

Darlington transistor for driving coils

I try to drive two small pcb coils. The coils have a resistance of around 14 Ohms (i dont know the L value). I have a PIC10F200 controlling the base of a BCV27. However i dont seem to get much more ...
1
vote
0answers
96 views

DC-DC boost converter resets mcu

Edit: A p-channel mosfet to keep DC boost circuit separated from main circuit until its charged worked like a charm. I'm trying to build a DC-DC boost converter, controlled by a 200kHz PWM signal ...
1
vote
0answers
76 views

How to put Sim808 and a microcontroller on the same PCB?

I'm families with Arduino (Nano and mini) and GSM modules and I've recently Learn about Altium Designer and I've designed (and ordered) a few simple PCBs and I've learned about Micro controller and ...
1
vote
0answers
103 views

Compiler settings to code in C with Proteus

I have made a circuit for a game called catch the light on Proteus. I have a C code for that. But I don't know how to set compilers and all that. I tried to add source code but due to some compiler ...
1
vote
1answer
100 views

PIC Alternate Pin Function for PWM

I am using a PIC12F1571 which have 3 PWM pins and two alternate PWM pins. What I want to achieve is to use the 3 original PWM pins and the switch to an alternate pin in software in order to get a 4th ...
1
vote
0answers
126 views

I2C PIC32 ack not recognized - solved

Edited solution: There are 1k8 ohm pullup resistors on the Curiosity board and there are 4k7 ohm pullup resistors on the trackpad which will give a total pullup resistance of ~770 ohm at max which is ...

1
2 3 4 5 6