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".

254 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
813 views

Is it possible to use Microchip's ZCD (Zero cross detect) circuitry in an isolated SMPS?

Let's say you have a device which is fed by AC line voltage and features an isolated SMPS. The switcher outputs 5 VDC, and that powers a PIC micro. I'm curious how is the Microchip's ZCD (Zero cross ...
4
votes
2answers
148 views

How to properly step down the voltage of a DC+AC signal that then goes inside a pin of a PIC?

The reason of the question is because i don't know if this is the correct way of regulating a signal that goes inside the pin of a PIC that accepts a signal that goes till 3V3. In the following image ...
3
votes
1answer
89 views

How can I improve my LED display code so that it reacts in real time

This is a carry on question from my previous one and I was wondering how I can go about improving my code, which currently has an extreme delay in outputting the numbers to the display and also not ...
3
votes
2answers
265 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
520 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
514 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
58 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
194 views

No change in MPU6050 values when interfaced with PIC. Why?

I'm trying to interface mpu6050 module with pic16f886 microcontroller. But, i'm getting x-axis, y-axis and z-axis as 0. Why is there no change in readings even when i move my mpu? edit: This is the ...
2
votes
1answer
274 views

Interfacing with a truck's internal CAN bus system

I'm currently exploring different ways by which I can communicate with a truck's internal CAN bus system and would like some advice on the most appropriate solution for me. I have overviewed the CAN ...
2
votes
0answers
1k 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 ...
2
votes
1answer
133 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 ...
2
votes
0answers
294 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
296 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
520 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
112 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
116 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
236 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
165 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
192 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
599 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
699 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
34 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
49 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
100 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
0answers
61 views

USB connection with PIC18F4550

I'm building a circuit of PIC18F4550 and trying to connect to PC as an HID device. It has already worked for once (the circuit was correctly recognized and installed on PC) but afterwards something ...
1
vote
1answer
80 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
45 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
39 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
44 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
56 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
39 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
94 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 ...
1
vote
1answer
63 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
77 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 ...
1
vote
0answers
79 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
48 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
50 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
92 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
71 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
vote
0answers
109 views

Using a PIC12F675 to generate a PWM signal using Timer0 and Timer1 interrupts

I would like to generate a PWM signal using Timer0 and Timer1 interrupts. The reason for using Timer0 interrupt is adjusting the frequency and the reason for using Timer1 interrupt is a adjusting stop ...
1
vote
0answers
38 views

Some question regarding pwm of PIC microcontroller

Hello guys i have some question regarding PWM. What does it mean by pwm master-slave?? Why it is called master-slave??
1
vote
1answer
35 views

PIC18F97J60 program download problem

I have a problem with downloading the .hex file to PIC18F97J60 using PICKit2. The software I'm using is MikroC when I'm trying to send the file it shows me: (warning: Some configuration words not ...
1
vote
0answers
51 views

How do I feed a digital value to the PIC CLC system?

I'm playing with a nice new PIC16F15356, and investigating the Configurable Logic Cell (CLC) capabilities - basically a 4-cell mini-PLD on the chip that can take inputs from any of a list of 40 ...
1
vote
1answer
137 views

How to synchronize PIC PWM clocks?

I'm considering a design which has multiple PIC-based controllers producing PWM signals at 31 kHz. Sometimes, under a well-defined "handover" condition, some pair of PWM power feeds will be connected ...
1
vote
0answers
227 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: ...
1
vote
2answers
1k 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 ...

1
2 3 4 5 6