Skip to main content

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

The LED does not blink with PIC16F84A-201/P

Environment MPLAB X IDE v6.20 PIC16F84A-201/P PICKIT3 The adaptor board for PICKIT3 looks like this: https://www.amazon.com/Comimark-Programming-Adapter-Universal-Programmer/dp/B07V5SHN5V/ref=sr_1_9?...
dixhom's user avatar
  • 247
0 votes
1 answer
43 views

SPI flash memory (AT26DF161A) with PIC16F883 write wrong data in memory and Manufacturer ID is wrong

I'm working on a product with a TFT display and I want to save the screens in a flash memory. I had available an AT26DF161A memory, so I build a prototype in order to test it with a PIC16F883. I wrote ...
Hernan Couto's user avatar
0 votes
0 answers
28 views

Soft Latching Power Switch with extra input

I'm working on a project that will be battery and/or USB powered. I would like to implement a soft power switch with the following functionality: Pressing the power button for ~1s turns on the device ...
Chris's user avatar
  • 95
0 votes
1 answer
29 views

Move PGEC2/PGED2 to PGEC1/PGED1 on PIC32MX

I have a board with PIC32MX795F512L. The board icsp connector is connected to PGEC1 (pin 24) and PGED1 (pin 25). I accidentaly flashed a hex bootloader (i don't have the source code) used for another ...
Isacco's user avatar
  • 89
0 votes
0 answers
79 views

Trying to get PIC code to work

Relevant info can be found in this Google drive folder, breadboard is 1:1 with the schematic. So, I've been scratching my head for the past few days to get this design to work, I tried to get some ...
JamesTDG's user avatar
0 votes
4 answers
133 views

Average filter of a signal in C

I'm having troubles designing a code for an ADC measurement, I'm trying to read a signal that comes from charging a battery with pulses, so the signal will be something like the photo uploaded. ...
samuel mattio's user avatar
0 votes
1 answer
90 views

Attempting to get a program for my PIC16F84A to work

I've been struggling for the past few days trying to get this to work right and need a professional to take a look at this and see where I am going wrong: Code: ...
JamesTDG's user avatar
0 votes
0 answers
44 views

MT3608L based step up power convertor not stable - seems caused by erase cycle of PICKit 4

I'm a hobby home cockpit builder, and making my panels myself. Panels have backlighting, for which I use LED's. To control the LED's, I'm using STP08CP05TTR having 8 constant current outputs. I use ...
Hans Billiet's user avatar
0 votes
1 answer
53 views

Problem regarding the code that I made for my PIC16F627A microcontroller

i'm facing problem regarding the code that i made for my pic16f627a microcontroller. here are the details so that you may understand exactly what i'm trying to achieve. i have set porta as input and ...
SOCIALIST POET's user avatar
1 vote
2 answers
77 views

How to reprogram PIC18F, if MCLR is disabled in first programming attempt?

I programmed my PIC18F2431 using a PICkit2 with internal master clear MCLR disabled. Now I can't reprogram the chip. How do I enable MCLR again?
Adil Ahmed's user avatar
0 votes
1 answer
60 views

Can I read a PIC24FJ128GA010 hex file from the microntroller using a pickit3?

I'm working on a proejct where I have a functional device and some old code with no instructions and no .x project file (abandoned project). I want to recompile the old code and reprogram the ...
SeanJ's user avatar
  • 929
0 votes
3 answers
126 views

MAX6675 SPI communication with PIC microcontroller

I'm using a PIC16F1832X to communicate with a MAX6675 thermocouple-to-digital converter. As I read the values of the temperature and the SSPBUF register, they are way too high; SSPBUF is 223. I assume ...
wqeeekendwrrar's user avatar
0 votes
1 answer
53 views

What can cause these CAN signal distortions?

I occasionally observe signal distortions on CAN H, CAN L, and so also the differential signal. It is causing the microcontroller (dsPIC33) to report so-called Invalid Message Receive (IVR) errors. ...
RoboTK's user avatar
  • 1
1 vote
1 answer
50 views

Reducing current consumption for a PIC16 / Sleep mode

I would like to operate a PIC16F628A in sleep mode with less than 1 µA. For that I have switched off all ADC, peripherals, etc.. But about 7.5 µA is the lowest current I can achieve. I have found a ...
Olaf Rechtner's user avatar
0 votes
0 answers
48 views

Variable speed drive for an alternating current motor with PIC18F4431

I'm designing a control board for a three-phase motor speed controller using a PIC18F4431. I've used an inverter powered by 24V DC to convert the voltage to 24V AC to power the motor. Additionally, I'...
embar's user avatar
  • 1
0 votes
2 answers
108 views

Does anyone know if there is a way to increase the power of the PIC16F pin using MPLABX?

I've been trying for hours to make a 4-digit display work with the TM1637 controller. On Arduino Nano it works well. When trying to port the Arduino library to the PIC, MPLAB-X XC8, the signal ...
user3394963's user avatar
5 votes
2 answers
348 views

PIC MCU wont accept external oscillator

I have been trying to use a PIC16F684 with an external oscillator. I tried a few, changed capacitors, added series resistor - nothing. Right now I have a 10 MHz crystal connected with 30 pF capacitors ...
Ri Di's user avatar
  • 1,039
0 votes
0 answers
54 views

STEP Motor Maximum Speed

Hello I'm struggling with getting my nema 23 step motor(3A max) to achieve maximum speeds and I'm wondering if its the algorithm or the motor driver. I'm using 24 volt power supply with TB6600 step ...
Bommersooner21's user avatar
-1 votes
3 answers
105 views

How is the sweep of duty cycle handled in common microcontrollers? [closed]

I have designed a PWM module in Verilog, and it was giving me a glitch. After debugging it for some time, I found that the value of the duty cycle was changing twice within a certain period. How do ...
Adam01's user avatar
  • 1
0 votes
1 answer
60 views

Difficulty defining interrupt in PIC18F14K50 [closed]

When I try to set the interrupt on change in PIC18F14K50, I can't get the interrupt to run once and turn off the flag. What could be the problem in working with this component? I am working with the ...
אסף באבי's user avatar
0 votes
1 answer
44 views

PIC32 VUSB3V3 must be externally powered?

I use a PIC32 and I want to use RB11. That's a USB pin but can be used as GPIO. The datasheet specifies in 18.4 page 180: For non-USB operation with RB11 and/or RB10 as GPIOs, the USB module must be ...
DamanZ4's user avatar
  • 29
0 votes
2 answers
87 views

Do I need to set configuration bits for oscillator in mikroC in code?

I am new to programming PIC, I use PIC16F684 (via mikroC). I want to do an accurate (up to 1 minute per 24h) timer to control relay, so I chose an external 16 MHz crystal oscillator. I connected it to ...
Ri Di's user avatar
  • 1,039
0 votes
1 answer
72 views

PIC reset pullup

I'm trying to repair a "Flexineb E2" veterinary nebuliser for somebody, it holds a charge and works plausibly well if the battery connection is briefly interrupted but will not power-on if ...
Mark Morgan Lloyd's user avatar
-2 votes
1 answer
68 views

A question about the use of 4017 and ULN2003A [closed]

Can someone please help me understand the use of CD4017 AND ULN2003A with the 7-segment display?
Abir El Abdellaoui's user avatar
0 votes
1 answer
101 views

Mplab XC16: can't use sprintf to convert float to string [closed]

I want to use sprintf function to convert a float to string, here is part of the main.c code : (PIC24JF64GA004) ...
Issam H's user avatar
  • 21
0 votes
0 answers
37 views

dsPIC30F 10 Bit ADC Module. Meaning of the SAMP bit

The documentation (https://ww1.microchip.com/downloads/en/devicedoc/70064e.pdf) is saying about the SAMP bit in the ADCON1 register the following: ...
Buran's user avatar
  • 21
0 votes
2 answers
63 views

Some characters lost in UART Transmission (PIC12F1822 -> SIM800L)

I am using the diagram recommended in the SIM800L datasheet to connect it to a PIC12F1822 MCU operating at 3.3V and 16MHz using its internal RC oscillator. ...
Vahid's user avatar
  • 289
1 vote
1 answer
71 views

Why is no data written to the I2C bus using this PIC12LF1822 code?

I am trying to implement a basic I2C Master write sequence for a PIC12F1822 Microcontroller. I am programming the device using the PICKit 3 programmer. I have heavily simplified the code to isolate ...
BlueShoes's user avatar
0 votes
0 answers
145 views

PIC16F1829: how to read device ID using LVP mode?

I am stuck. Datasheet, programming guide. LVP mode. I see how to write to area 0x8000-0x8008 using "load configuration" command, but I do not see how to read this area. It is not a part of ...
Anonymous's user avatar
  • 7,120
0 votes
1 answer
59 views

Do not get how to time PIC16F USART sending in interrupt-driven environment

Device: PIC16F1829, half-duplex communication (RS-485) The USART is having two registers - TSR and TXREG. Transmit is performed from TSR and process is indicated by TRMT bit. TXREG is second register ...
Anonymous's user avatar
  • 7,120
0 votes
0 answers
84 views

PICkit 5 giving -109 error when programming PIC

I have a PICkit 5 which I think is correctly connected to a PIC16lf18425. Whenever try to program it I get error -109 I just have a 0.1 uf electrolytic capacitor between GND and VDD and a 10k ohm ...
doge guide's user avatar
1 vote
1 answer
67 views

May I safely apply negative voltage to PIC's analog input?

For example I'd like to apply AC voltage ~3V. Could I not detect, but simply connect to MCU? I'd measure positive side as regular ADC, but I simply do not want negative side of amplitude to damage it. ...
Ri Di's user avatar
  • 1,039
3 votes
1 answer
261 views

Why is Vdd connected to GND?

I am trying to build a JDM programmer for PIC. I looked at many circuit diagrams. During my analysis one thing I noted is that on most of the circuit diagrams the Vdd of PIC is connected to the GND of ...
shafeeq's user avatar
  • 133
0 votes
1 answer
64 views

Shape of signals in PORTB of PIC after executing code

I am trying to understand how in this document the signals in PORTB.0, PORTB.1 and PORTB.2 are drawn. According to the code, there is an infinite loop and we are every time adding 10 (in binary), so ...
Badr Eddine's user avatar
0 votes
1 answer
61 views

Writing EEPROM on PIC18F27Q83

I'm trying to write the EEPROM (DFM) on a PIC18F27Q83. I copied the sequence from the datasheet exactly and it still fails. The device id is 0x9909 and revision id is 0xA45. ...
vini_i's user avatar
  • 7,137
2 votes
1 answer
70 views

PIC assembler to perform arithmetic on 10-bit number spanning 2 registers

I wondered if there was any 'clever' way of decrementing a 10-bit value which is stored across 2 registers. In this case, its the PWM duty cycle value which has its 8 MSB in PWM1DCH and its 2 LSB in ...
NomadAU's user avatar
  • 183
0 votes
0 answers
53 views

Pump motor interference with PIC microcontroller

I am building a fermentation chamber for sourdough which has a heating element and a 5v mini-pump for humidity. Both are controller by a PIC16 microcontroller. Without the pump all is well, but as ...
Elad Lahav's user avatar
0 votes
0 answers
55 views

What are the key design components for illuminating Christmas lights using a PIC

So my cheap Christmas lights failed this year due to something broken in the control logic. I thought I would try and build my own control circuit and use them again next year. The LED lights still ...
NomadAU's user avatar
  • 183
0 votes
1 answer
75 views

MSSP setup on PIC16F18313

I am new to using PIC16F18313 and having some difficulty setting up the MSSP module. I am using PICKit 3 on Windows 10 with MPLAB X IDE v5.40 and XC8 compiler v2.41. The IC has pullup resistors 4.7k ...
RickyBoy's user avatar
  • 169
1 vote
1 answer
111 views

PIC16F18855 adc read mismatch

I wrote a code for pic16f18855 analog voltage to digital value reading. but I noticed that analog voltage connected to pin RA0 read with RA1 and analog voltage connected to pin RA1 read with RA2 and ...
Alina Khan's user avatar
1 vote
1 answer
98 views

Controlling PWM Fan/Read Sensor from PIC16F18877

I am working on a controller based around the PIC16F18877 which will need to control a 4-wire 12V DC Fan, as well as read the signal from the sensor wire. The PWM signal needs to be somewhere between ...
Dominick's user avatar
  • 111
0 votes
0 answers
64 views

Identifier whose declaration cannot be found. TRISbits

Currently trying to program a PIC32MZ2048EFM144. I'm new to PIC programming, and I'm currently attempting to set pins J7, 3, and K7 as outputs and set them to a high state. However, I'm encountering ...
Sean 's user avatar
  • 21
1 vote
2 answers
156 views

Unable to resolve TRISBbits even with xc.h included

I am new to PIC programming, and I am trying to blink an LED using the PIC32CM MC00. I understand I must declare them as inputs or outputs, but the IDE I am using (MPLAB) keeps giving me an error when ...
Sean 's user avatar
  • 21
1 vote
0 answers
74 views

Is it possible to display DHT11 on a 4 digit-7-segment with a PIC16f877A?

I'm trying to display the temperature of the DHT11 on a 4-digit-7-segment. I simulated it on Proteus and the result always equal to 0. I wonder if the way I used timer to display the LED affected the ...
stevievei's user avatar
0 votes
0 answers
106 views

Different result displaying LM35's temperature on a 4-digit 7-segment using PIC16F877A versus Arduino

I'm working on a project using a display LM35 using PIC16F877A but the room temp was measured around 70°C. I tried using this LM35 with Arduino and it showed result around 40°C. I used a multimeter to ...
stevievei's user avatar
1 vote
3 answers
125 views

PIC16f628a internal oscillator runs at a lower frequency than expected

Specifically speaking, it runs at almost exactly 1 MHz instead of the supposed 4 supplied by the internal oscillator. This is probably the cause of other strange behaviour like failing to blink an LED ...
Hubert S's user avatar
0 votes
1 answer
115 views

PWM on desired pin PIC18f47k40

trying to question again.. Thanks in advance for any help! I've been working with PIC chips for a while and recently using a PIC18f47k40. I cannot get the PWM via CCP or the separate PWM modules to ...
Lukas Brenner's user avatar
0 votes
1 answer
50 views

Is it possible to force an input port during debugging in MPLAB IDE v8?

I am using MPLAB IDE v8 (not IDE X) to write some PIC programs (PIC18F4321) in assembly. I am using the debugging tool MPLAB SIM to debug the programs, however I am not able to force port bits from ...
bardulia's user avatar
  • 407
1 vote
1 answer
46 views

Programming a PIC with a programmer on demo board

I'm a beginner on PIC world. I'm doing a project with PIC PIC18F04Q40 and I'm curious if I can use the programmer/debugger present in a Curiosity HPC board to program the PIC18F04Q40 through ICSP ...
noob_programmer's user avatar
0 votes
0 answers
94 views

Controlling LED drivers with a PWM using a PIC MCU

In one of the circuits I'm working on, there are three LED's connected to every LED driver output (I have a space and cost constraint because of which I need to use this). The high side of each LED is ...
Siddharth Goel's user avatar

1
2 3 4 5
57