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

learn more… | top users | synonyms (8)

0
votes
1answer
26 views

Is it wrong to write HIGH to a pin used as an open collector?

I'm a software engineer playing with PICs and have an old PS/2 mouse that I am using (successfully), which has CLK and DATA connections as open collectors. So I have configured the internal pullups ...
0
votes
0answers
14 views

PIC18 DELAYTCY parameter problem

I want to set a delay of 1s, I set internal oscillator with 4MHZ, so TCY = 4/4MHZ = 1us so one second = 1us * 1000 000 so Delay10KTCYx(100) means delay 10kilo * TCY(4/4 = 1us)*100 = 10000*1*100 = ...
0
votes
1answer
29 views

PIC18 how to explain : you write bit 1 by making TRIS input

I'm reading 1_wire header file for PIC18 with C18 compiler. in the write_byte function, they specified that in order to write bit1; we make line input and that will take it high. can we specify high ...
3
votes
2answers
48 views

Debugging a PIC16F84A interface with a 4N25 optocoupler

I have a PCB board that I'm trying to repair, the principle of this circuit board is to switch an oven relays one at a time only with a constant rest time, and the switching time is predefined by the ...
0
votes
0answers
42 views

trouble getting two PICs to communicate via I2C

I'm having a bit of trouble getting two PICs to communicate with each other over an I2C line. Both are 16F886, one sitting in the PIC 28-pin demo board, second one sitting inside a board which I ...
1
vote
1answer
23 views

Help needed driving an old PIC programmer from Raspberry Pi GPIO

I have been trying to use a Raspberry Pi's GPIO pins to drive an old PIC programmer board that used to have a parallel port connection before I started messing about with it. You can see from the ...
-1
votes
2answers
53 views

Is PIC microcontroller PIC16C72 and PIC16F72 almost the same from a programmer's perspective?

I just wrote a program to use in PIC16F72. I was trying to simulate it on Proteus and I found that Proteus doesn't have that microcontroller in its library. I read somewhere that PIC16F72 and PIC16C72 ...
1
vote
1answer
55 views

PIC operating temperature… “industrial” vs. “extended”

I am shopping for a PIC micro-controller for use in an automotive application. I noticed that PICs are offered in both "industrial" and "extended" temperature ranges ([-40C to +85C] vs [-40 to +125]). ...
0
votes
5answers
76 views

Shortest time to visibly light LED

What is the shortest time (pulse 010) to visibly light a LED? Visibly = The human eye can see the LED blink. I use 5V as source and PIC16F628A@20MHz for the project. Here is a datasheet for the ...
1
vote
2answers
68 views

PIC32 Peripheral Pin Select for Digital Output

I'm using a PIC32MX250F128B for a project to drive several digital outputs; I need to control the digital output for about 13-14 pins. (using the code below). These pins work: RA0, RA1, RB0, RB1, ...
1
vote
0answers
16 views

Problem with Constant Off-time PWM/Variable Frequency on dsPIC30F2020

I'm using the Microchip dsPIC30F2020. I've been trying for the longest time to get some sort of PFM signal for my project. I see in Section 12.4.7 there is the ability to have constant off-time PWM ...
-1
votes
2answers
44 views

The relation between acquisition time and clock in ADC output?

This is a question that happened to arise in my mind while experimenting on hardware.I was working on pic18f26j50 which falls under the advanced 8 bit controller family from microchip. They provide 12 ...
1
vote
0answers
30 views

Help with PFM with PID Control on dsPIC30F2020 (Pulse Frequency Modulation)

I'm using the dsPIC30F2020 trying to do a project that compares and contrasts PWM and PFM bucks converters. I have the PWM buck converter working perfectly. So for the PFM I used the exact same code ...
4
votes
3answers
72 views

What facilities/methods exist to debug and simulate programs for PIC microcontrollers

In the university, even though I did do some PIC programming and project, the project was quite simple. We could always put in a blinking LED as a sign of life into our program or have the code write ...
0
votes
2answers
83 views

PIC16F877A Timer0 delay problem?

To get min 5ms square wave. I chosen prescalar as 1:32 (The internal clock given 4Mhz), what will be the TMR0 register value? Is it 0x64 or 0x63 !!
0
votes
1answer
39 views

Proteus doesn't show the value of float variables and does not attribute values to them

I have an issue with Proteus Isis. The image below illustrates the problem. I can't see the values of a struct's fields and I think that Proteus can't see the struct too. Full Resolution Anyone ...
2
votes
1answer
75 views

Timer0 Interruption xc8

SOLVED: I put here my code, I hope it helps someone! ^^ TIP: My problem was because I was comparing if PORTBbits.RB3 == 0 or == 1; the solution has been comparing a variable instead a state. ...
3
votes
1answer
94 views

XC8 Compiler array of struct initialization problem

I'm using MPLAB X IDE with XC8 compiler and I would like to create a menu system to a GLCD module, but I'm having trouble initializing my MainMenuItemsList[] array. ...
0
votes
2answers
58 views

arduino based pic16F877A programmer

is it possible to program PIC 16F877A using arduino uno? if it is possible, please tell me how to this;
0
votes
0answers
35 views

Proteus Simulate RS232 between PC and PIC16F887 - Receive wrong characters

I simulate RS232 connection between PC and PIC16F887 in Proteus with COMPIM and Putty. But, when I send a string from MCU to PC ( Putty ), it receive wrong character. I couldn't figure out what went ...
0
votes
1answer
65 views

MPU6050 I2C PIC18F458

I'm using MPU6050 with PIC18F45 protocol I2C. On EasyPIC v6 board its just send me back anything that I put in this WRITE command I2C1_Wr(0xD3);. I replaced the ...
0
votes
2answers
54 views

HD44780 in 4bit mode connected to only ONE PORT on PIC

i am new to PIC programming. I am using MPLAB X + XC8 compiler. I have on a breadboard an PIC18F4550 connected to a HD44780 compatible LCD. Digging online i found out a routine to interface the PIC ...
2
votes
2answers
72 views

PIC18F44K22: Can't use MCLR/RE3 pin as input. MCU resets when RE3 is held down

I'm trying to use the 4-bit wide PORTE on a PIC18F44K22 MCU. This port contains the RE3/MCLR pin which can be configured as a reset pin or as an input pin by setting/clearing the MCLRE bit on ...
2
votes
4answers
53 views

extern and the XC8 C compiler

Perhaps I don't fully understand extern. With the XC8 C compiler, it seems like I can get away without using it. In the file ...
0
votes
1answer
54 views

MPLAB X IDE on computer emulation / debugging how to set input values?

Is there any way I could emulate input into chip using the free emulator, when debugging my code to see if it responds correctly into input?
0
votes
3answers
93 views

Is it Electrically Correct to Direct Driving Seven Segment in Multiplexed Manner?

I want to design a voltmeter with minimum no of components so the pcb becomes as small as possible.For this purpose i wish to direct drive the seven segment display. Considering the fact Typically ...
0
votes
1answer
95 views

PIC - 4-20mA (Duty cycle formula)

I am implementing a 4-20mA current loop to my PIC. I have everything working. I am measuring the distance away from an object. When I hardcoded the distance as 300 the output voltage is 4V and when ...
1
vote
1answer
79 views

External interrupt doesn't set flag bit

My goal is to measure PWM pulses. But to achive that I'm making baby steps, so my first goal is to set a pin when an edge of the PWM signal is detected. The PWM signal enters the microcontroller ...
2
votes
2answers
123 views

PIC24FJ64GB002 UART Bridge

I work in a project but I have a problem. I want make a program what drive the two UART in a PIC, each UART at different baud rate. The idea is take a signal for UART1(9600 bauds) and send to UART 2 ...
0
votes
0answers
45 views

Correct use of TOS registry in PIC18f4550 HI-TECH C compiler

I'm working in a multitasking program PIC18f4550 HI-TECH C compiler in MPLAB X IDE. The logic of the program is: The PIC receive a command via RS232 to Load or Unload a Task. While there is ...
3
votes
4answers
257 views

GOTO a specific address in HI-TECH C Compiler PIC18F

I'm trying to jump to a specific address in HI-TECH compiler and the address is given dynamically. I tried using asm() function but it looks like the argument must ...
0
votes
2answers
89 views

Blinking LEDs in reverse order

The code below flashes some LEDs in order: pin 1, pin 2, pin 3, pin 4. After this sequence has completed I would like to reverse direction and show pin 4, pin 3, pin 2, pin 1. I wrote the code ...
1
vote
2answers
58 views

Set function to specific address in PIC18F with the HI-TECH C compiler

I want to put a function in an specific address of memory like PIC C Compiler (#org). I'm using MPLAB X, HI-TECH compiler and PIC18F4550. In PIC C compiler: ...
-1
votes
1answer
102 views

How to start to drive a multi-color LED?

I wish to design a circuit that uses one button to turn on a multi-color LED to a preselected color, and then uses repeated button presses of another button to cycle the LED through 2 or 3 colors. In ...
2
votes
1answer
82 views

PIC18 not working when wiring 30pf capacitors of cristal resonator to ground

I'm using pic18 with external oscillator 16MHZ 16M HZ HC-49S Crystal Oscillator with two 30PF capacitors configuration OSC = HS using breadboard, when wiring the ...
4
votes
2answers
412 views

Fastest time a PIC can set and clear a pin

What is the fastest time a microcontroller (PIC16 in this case) can be set and cleared? It is defined by the frequency, but I don't know the formula to calculate the fastest time that a single pin can ...
0
votes
1answer
41 views

Trying to start i2c communication on dspic33fj128gp802, but I cannot write on the SEN bit of the I2CxCON register

Good evening, I was trying to start the communication with the I2C on my pic. I only set the bits in the control register in the code for now and the inizialization of both the pins and the PLL, and I ...
2
votes
2answers
112 views

What is __bit in the XC8 C compiler?

Let's take an example: extern volatile __bit TRISB0 @ (((unsigned) &TRISB)*8) + 0; I believe this is pointing TRISB0 to ...
1
vote
1answer
118 views

PIC32 does not get UART RX interrupts in xc32 Compiler

I'm trying to setup a UART channel on my PIC32 MCU (PIC32MX470F512). But the code does not reach the ISR at all. I have verified that the PPS (peripheral pin select) is configured properly and the ...
2
votes
0answers
57 views

PIC12F ADC conversion has an unwanted offset

The current setup is shown below. PIC12F1822 with a 10-bit ADC. I'm using a 250R 0.05% precision resistor to get a nice 0-5V input to the analogue pin (AN2 if it matters). As far as I can tell I ...
0
votes
1answer
43 views

PIC16F57 - problem implementing wake up signal on key stroke

I have designed a simple RC5 remote control using a PIC16F57 and the classic rows-columns scan over a 4x4 matrix keypad. The previous version of my firmware continuously scanned the keypad to find a ...
1
vote
1answer
394 views

HDD Motor Spinning

I'm trying to run a hdd motor using the following link. http://theamateurprogrammer.blogspot.hk/2014/02/revitalizing-old-hard-drive-motors.html Instead of using Audrino I'm using PIC16F73.I tried to ...
0
votes
1answer
42 views

Simple PORTA Control via PIC

I am trying to setup a simple blinking LED on a PIC18F25K50. I can get RA0 to toggle using LATAbits.LA0 = ~LATAbits.LA0; However, if I try to use ...
0
votes
1answer
59 views

Trouble holding MCLR line low for PIC ICSP, ICD3 works, hardware defect?

I have an ARM Cortex-M3 that talks to a dsPic33F. I am attempting to do ICSP programming of the attached PIC. I have an analyzer and can see that I cannot control the MCLR line the same way the ICD3 ...
1
vote
3answers
79 views

What is the difference between debug mode and normal execution on dspic?

I have a dspic33fj128mc802 microcontroller. I am using mplabx and xc16 compiler. I have my internal oscillator set up to 80MHz. I have managed to setup FreeRTOS on the device and everything compiles ...
1
vote
2answers
86 views

How to find duty ratio of a PWM using input capture?

I have a controller PIC18F and it supports input capture peripheral. I understand it can be used to find the frequency of the incoming signal. How can the duty ratio of PWM can be obtained from the ...
0
votes
3answers
109 views

I'm trying to implement interrupt from RB pins. But it doesn't work

I'm new to PIC programming. I made a program to get interrupt from RB pins. but it doesn't work. My code is as follows: ...
1
vote
1answer
77 views

Two functions in the high priority interrupt

I'm using the PIC18F46k22 mcu and I'm using two function in my high priority interrupt routine: ...
0
votes
1answer
64 views

How come the value in my RAM of DS1307 RTC become zero?

I'm using the 56 bytes of RAM in the DS1307 to store some data. My DS1307 is connected to the PIC18F46K22. But after running a few days, all the data inside the RAM will suddenly become zeros. The ...
0
votes
4answers
107 views

Wiring up an LCD display with unknown controller

I found an old LCD in my pile of trunk. I would like to be able to use it. However, someone (possibly / probably me) sawed off the part of the PCB with the series code, so I can't know what the ...