Questions tagged [pic16f]

8-Bit microcontroller family from microchip

Filter by
Sorted by
Tagged with
1 vote
0 answers
32 views

How would I connect to these ICSP pins and what is the purpose of the transistor?

I have an old tire pressure monitoring system and was hoping the PIC16F886 in it doesn't have the code protect bit set so that I can modify the behavior of it (namely turn off the beeping from it in ...
  • 185
0 votes
3 answers
98 views

PIC16F1519 gets stuck when reading UART (RCIF never goes to 1)

So, I'm prototyping a project for my school, and I have to read serial data from a GPS module (uBlox NEO-6M) and then do some calculations about velocity and distance and turn on some leds. For the ...
  • 79
-2 votes
1 answer
68 views

Question regarding the ADC MCP3201 interfacing with PIC16F72 microcontroller

I provide the 1.2 MHz clock to SCK pin to the ADC from PIC clock pin, but how I can receive the data from MCP3201 ADC, which provides a 12 bit binary data on SPI pin SDI of PIC? Buffer of PIC is 8 bit ...
0 votes
0 answers
37 views

PIC16 Configurable Logic Cell (CLC) - toggle signal

I have a 1Hz square signal (in_1) and a 1/16Hz pulse (in_2) as inputs of a PIC16F1778. The rising edges of the two signals are synchronous as shown in the picture: I want to use the configurable ...
  • 194
0 votes
0 answers
48 views

PIC16F15244 - Transfer error when code's changed

I am currently working on a PIC16F5244. I am currently trying to correct a problem that despite my multiple searches and tests is still present. When I mount a new PIC16 on my PCB, I can program it, ...
  • 11
0 votes
2 answers
75 views

PIC16F18446 Tristate output pins controlled by the value of another pin

In many 74xx chips the high impedance state of pins is controlled by a OE pin. I want a similar functionality for my PIC device. I understand that I could use code to flip the config bits to make the ...
  • 35
1 vote
2 answers
63 views

BANKSEL problem with PIC16F18855

I'm working with PIC16F18855 and have some problem with select memory bank via BANKSEL. In listing I see strange message and it's not working properly. ...
  • 17
1 vote
1 answer
137 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 ...
0 votes
3 answers
465 views

How to write simple text or display image on the SSD1322 OLED display

As anyone been successful to display a simple text or a grayscale image to the OLED display using the SSD1322 controller like the Newhaven Display 25664? I have managed to initialize the display using ...
  • 19
0 votes
2 answers
123 views

PIC18F4550 : How to convert 16 bits integer to two 8 bits chars in C?

I'm blocked because of an issue that is causing a lot of time loss. I've created a function to get the LSB and another one to get the MSB. ...
0 votes
1 answer
153 views

How to read protected PIC16F676

Well I have broken pcb and it has a PIC16f676 on it. PCB Not working very well. I want to replace it with new pic16f676 but I cant read data from on board PIC. it ruturns "0000" in ...
  • 925
0 votes
2 answers
2k views

How do I resolve the following error "Verify failed. [ Pgm ] at 0x0, expected 0x00002805, got 0x00002807" in MPLAB X IDE

I recently decided to get into learning how to develop embedded systems, using MPLAB X IDE and literature available on microcontrollers. The vast majority of which referenced the PIC16F84 and as such ...
  • 541
1 vote
1 answer
99 views

PWM-modules operating simultaneously on different frequencies

I am using a PIC16F15345 which has 4 10-bit PWM modules. In order to minimize electromagnetic interference I tried to use the PWM-modules on different frequencies working simultaneously, but it did ...
  • 41
0 votes
1 answer
77 views

PIC microcontroller restarts command

I set my pic microcontroller (16f688) to energize a relay after 3 secs and to energize two more relays another 2 secs after. Problem is, sometimes, after it executes this command, it deenergizes the ...
  • 72
0 votes
2 answers
1k views

PIC - How to program them in assembly?

For years I programmed PIC controllers in assembler, but let it drop. Now I want to get back to where I was, and - so help me - I can't find out where to start. Downloaded MPLAB-X-IDE and it says I ...
0 votes
1 answer
200 views

PIC16F877A I2C MSSP not sending data

Sup, guys. I'm in the violent war with PIC MCUs and they're clearly winning, so I'm asking once again for your intellectual support. I have PIC16F877A on a breadboard, external 8Mhz+2x20pf, bypassed, ...
  • 3,348
2 votes
2 answers
200 views

PIC16F877A External Crystal giving 60Hz

I'm new around here. Usually I read a lot of stuff and find all info I need, but this once I googled my fingers till blood, yet to no avail. Recently got my hands on PIC16F877A. It wasn't MCU of my ...
  • 3,348
0 votes
1 answer
307 views

MPLAB X XC8 error expression is not assignable and invalid digit 'F' in octal constant

I am programming a PIC16F887 with MPLAB X, the compiler is XC8 v2.10 and the hardware tool is PICkit3. When compiling the program I get these errors in the following constants of the program. ...
  • 93
0 votes
0 answers
235 views

Programming a PIC16F84A Microcontoller in assembly with MPLAB increment problem

I'm programming a PIC16F84A microcontroller to automatically increment a number with a 1 second delay, and get it displayed on a 7 Segment Display. The 7 segment display is already set so there's no ...
  • 83
1 vote
0 answers
89 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 ...
  • 958
1 vote
0 answers
88 views

PIC16F7X I2C Issues With 24AA01/24LC01B EEPROM

I have an existing PCB that is no longer supported by the manufacturer and has been plagued with software issues for years. So i don't have much control over how the board is laid out and what ...
  • 23
6 votes
1 answer
1k views

"Not enough RAM " error in PIC16F877a

I have been trying to run the following code: ...
0 votes
1 answer
121 views

Does the increment of a timer on pic is equal for a pic16 and pic32?

The question is because in porting code from a PIC16F15324T using MCC to a project using a PIC 32MX470F512L. There are portions of code where i have code like this: ...
  • 371
0 votes
1 answer
199 views

PIC16F884 keeps resetting even though WDT should be off

I just bought a PIC16F884 and put a simple C program on it using MPLAB: ...
0 votes
1 answer
98 views

Read High voltage from PIC16F [duplicate]

I have planned to build a circuit to display voltage and time value using PIC16F877A micro controller.To do this i tested the circuit using Proteus software as i attached here. It can display up to 5V....
  • 1
0 votes
1 answer
918 views

Serial port framing error

I'm new to pic and uart. Just trying out simple uart transmission. I'm using mplab IDE and coolterm for serial monitoring. I'm getting serial framing error. I also used PuTTY and it was printing junk ...
1 vote
1 answer
3k views

Copy protect program code in PIC microcontroller

I'm trying to copy protect my code which i program in my PIC16F886 microcontroller. I've set the below CONFIG options in MPLABX and compiled it, got the output hex code. But no matter i set it, i'm ...
0 votes
1 answer
86 views

blinking LEDs with PIC16LF1829 with frequency of 1 second in Assembly Code

New learner on Microchip. I'm now trying to make the PIC16LF1829 to make the four LEDs blink in a frequency of 1 time/second. My intention was modify the oscillator frequency at different positions of ...
-1 votes
1 answer
211 views

Is it possible to generate 4 PWM signals using a single PIC16F84A IC? [closed]

I have made a line follower and the issue I'm facing right now is its speed adjustment. The motors run too fast and make my robot go off track. Luckily my motor driver supports speed control through ...
0 votes
1 answer
51 views

How to use three CCP modules in compare mode simultaneously in PIC16F?

I need to use the three available CCP modules (CCP1, CCP2, CCP7) in compare mode simultaneously. They all use Timer1 as reference to compare. My goal is the following: on every match, for each of ...
  • 13
0 votes
2 answers
217 views

I'm stuck with this simple PIC16F program. Help please!

I'm just getting started with PIC programming and I'm giving up already. I just want to make an LED blink! I'm working with a PIC16F1773, MPLABX IDE v4.05 and Pickit3. These are the configuration ...
  • 13
1 vote
1 answer
168 views

PIC16F1936 Multiple ADC channel readings

I am programming a PIC16F1934 and using it's two ADC channels namely AN0 and AN1. I take the maximum out of a bunch of few readings for the AN0 reading and then just one sample for AN1. Here is my ...
  • 107
0 votes
1 answer
72 views

PIC16F1776 interrupt triggered with no evident source

I have a Microchip PIC161776 running at 32 MHz. Interrupt Code has been generated with MCC, with the preemptive option set. typically, about once every hour the interrupt routine gets called with no ...
1 vote
1 answer
611 views

I2C doesn't send data in PIC16F887

I'm relatively new using PIC microcontrollers and MPLAB XC8 compiler. I want to communicate two PIC16F887 using I2C. I did use this tutorial (https:// electrosome .com /i2c- pic-microcontroller-...
0 votes
1 answer
1k views

pic16 i2c interrupt

I’m trying to use the Microchip Code Configurator to make an I2C communication between two PIC16F1827. My application is very similar to the example they give with an emulated EEPROM. I've used ...
1 vote
1 answer
203 views

Timer 1 can't increment on external T1OSI source for PIC16f627A

New to PIC programming Trying to Simulate a PIC16F627A TIMER 1 using MPLAB X IDE where RB7/T1OSI increments, and it toggles RB4 through TMR1 ISR. ...
-4 votes
1 answer
150 views

I have problems with programming a PIC16F84A with Pickit 2

So I've been trying to program a PIC16F84A Microcontroller with a Pickit 2 for 7 days now and I still can't make it to work. I have an LED attached to pin RB4 and I want to make it blink. Any help ...
0 votes
1 answer
2k views

Can i replace 1n4148 with 1n4007 in this circuit (pic Programmer) [duplicate]

I want to conceive a pic programmer i found this circuit but i didn't find 1n4148 can i remplace it with 1n4001/1n4007 in this circuit It affects the pic or dysfunction of the system in speed ou ...
1 vote
1 answer
511 views

undefined symbols for structs on compile MPLab XC8 on pic16F872

I'm receiving the undefined symbols error on XC8 for two struct arrays declared as externs in file io.h. Why is this happening? ...
0 votes
0 answers
388 views

How to increase max output voltage on CCP pin using PWM on PIC16F882?

I am trying to replicate a circuit containing PIC16F882 that I found in an electronic appliance. I wrote code in MikroC that perfectly follows that logic, but the peak voltage of the CCP pin that I'm ...
0 votes
1 answer
888 views

Cannot connect Hc-05 with PIC16f877A

I am trying to connect my HC-05 bluetooth module with PIC16F877A. I know we have to use USART to talk with bluetooth module. So I started with USART of PIC by reading its datasheet. I am using ...
-3 votes
2 answers
106 views

Pic micro controller

i am programming pic microcontroller using mikro c , i want to store array of 8 bit samples generated from audacity (it's a software used to generate header file from audio file) , i got one header ...
-1 votes
1 answer
2k views

what is meant by initializing Ports in Pic microcontroller as 0x00

Why is meant by statement as TRIS = 0x00 or LATB = 0x00, Why 0x00 while programming for PIC microcontroller in C.
  • 1
2 votes
1 answer
1k views

Confusion about #pragma in XC8

I'm currently programming a pic16f18323. I'm using MPLAB X. And XC8 as the compiler. I just want to ask if pragma configurations can be shown as ('110' is the binary representation of 3 bit RSTOSC ...
  • 339
0 votes
1 answer
613 views

PIC16F877A microcontroller security project

Recently I was working on a security project using PIC16F877A. The program works fine on Proteus, but when I build my circuit on a breadboard, it gives random sentences. It should wait for the input ...
3 votes
2 answers
194 views

Pic16 Timer0 puzzle

INTRO The whole point of a timer with overflow interrupt is that the interrupt will trigger on a precisely timed interval - so long as the code executed in the interrupt doesn't take longer than the ...
0 votes
1 answer
589 views

sleep mode in pic16f1618/19

I am trying to reduce the power consumed by microcontroller pic16f1618, and hence I thought of using SLEEP(). All interrupts such as timer, and pin are disabled. The code is generated with the help of ...
0 votes
2 answers
2k views

No clock signal on SCL pin of PIC16F1618

I have been trying to configure I2C on PIC16F1618 microcontroller. I am using MPLAB X IDE, along with xc8 compiler. The MSSP code is being generated through MPLAB code configurator. I have set the ...
0 votes
2 answers
759 views

Interrupt and timer on PIC16F690

I 'm new to mikro c and PIC programming and I 'm having troubles shutting down the LED on RB5(green)using interrupt on RA2 and this interrupt is possible only in 5 first seconds. Any help will be ...
-2 votes
2 answers
581 views

Using 7-Segment Display on pic18f

I want to show a decimal number between 0-99 on 7-segment display by using 2 push buttons. These buttons will be used for incrementing and decrementing the number on display. I'm using pic18f assembly ...