Questions tagged [pic16f]

8-Bit microcontroller family from microchip

65 questions
6
votes
1 answer

"Not enough RAM " error in PIC16F877a

I have been trying to run the following code: void reset(); int board[8][8]; int i,switcher,j,k; void main() { TRISB = 0X00; TRISD = 0X00; TRISC = 0X00; reset(); ADCON1 = 0X06; TRISA =0X11; while(1) { for(…
ferty567
  • 73
  • 3
3
votes
2 answers

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 timer interval. THE PROBLEM On a PIC16LF1823, I…
2
votes
1 answer

How to configure RC3 pin as output in PIC16F886?

I already used it with a PIC18 and the RC3 pin is working for me, but for the PIC16F886 the 14th pin is described as "RC3/SCK/SCL", however, in picture 18 it is described as only "RC3". Any head start / help that someone can provide?
2
votes
2 answers

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 choice, I have another PIC, which I couldn't get to…
Ilya
  • 3,478
  • 7
  • 33
2
votes
1 answer

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 configuration in Oscillator configuration register.…
packt
  • 349
  • 5
  • 17
1
vote
1 answer

PIC16F628A input not working

I am using PIC16F628A, MPLAB IDE to coding and Pickit3 to write the code into MCU. The code works on Proteus but does not in real world. I setted A0 pin as input. It should count up normally and count down when button pressed. It count down when…
akiftokel
  • 25
  • 4
1
vote
1 answer

PIC1618044 Error while reading EEPROM 24LC64F

I am currently trying to program the I2C to communicate with an EEPROM 24LC64F, with its pin A0, A1 and A2 to GND, 4.7k ohms on SDA and SCL pins, 5V on VCC. I currently have these lines of code : I2C.h #define ControlRead 0xA0 #define ControlWrite…
Benito
  • 21
  • 4
1
vote
0 answers

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 certain scenarios but not others.) It has one set…
K_T
  • 185
  • 4
1
vote
2 answers

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. 0000 0020 00030 BANKSEL PORTA 0001 018C 00031 CLRF…
xboborx
  • 17
  • 5
1
vote
1 answer

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 Curiosity board. I want to be able to vary the pulse…
1
vote
3 answers

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 I decided to invest in the hardware to build and…
aLoHa
  • 587
  • 1
  • 6
  • 16
1
vote
1 answer

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 not work. According to the data sheet (page 328)…
GoranF
  • 41
  • 4
1
vote
1 answer

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. control.c: 125: 12: error: expression is not…
Geo
  • 213
  • 1
  • 11
1
vote
0 answers

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 modules, including certain configurations of I/O…
SusanW
  • 987
  • 7
  • 26
1
vote
0 answers

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 components are used. The board has a PIC16F747 running…
JonesyH
  • 23
  • 3
1
2 3 4 5