PIC is a brand of 8, 16, and 32 bit RISC microcontrollers manufactured by Microchip. "PIC" originally was an acronym for "Peripheral Interface Controller".
0
votes
0answers
27 views
PIC delay using XC8 compiler
I have been playing around with my Microchip PIC18F13K22 for a while now. But one thing I have been wondering about is the fact, that the compiler's __delay functions do not work as intended.
I have ...
0
votes
1answer
40 views
Using UART's TX & RX for Separate Functinality
I am using PIC18F4520.
The project requirement is to interface GSM module with uC as well as receive commands from PC via serial port.
to achieve this I have connected Microcontroller- TX to GSM ...
0
votes
1answer
38 views
Speedometer using CCP
I made a Speedometer using CCP pin as input. it works. but i have some problem. speed is changed frequently within a range, even using static frequency (When I use a static frequency, It should ...
0
votes
1answer
28 views
SPI refuses to send in dspic33
I'm trying to talk to an RFM22 wireless module. I'm having a hard time getting the SPI functional. I'm working with a dspic33ep512mc806. I'm debugging directly in hardware with a pickit3.
After ...
-3
votes
3answers
67 views
Pic microcontroller relay switching of 1 HP single phase motor [on hold]
The situation is I am using pic microcontroller for power supply I am using 230 to 12 v stepdown transformer + 1000 uf 25 v capacitor + lm7805 + 10 uf 25 v capacitor from and these two positive and ...
-1
votes
1answer
39 views
How to use two timers simultaneously to control 2 servo motors
im very new to PIC. Im trying to control 2 servo motors for the wheel of my robot. Im using PIC16f877A MCU, servo motor and 4 mhz crystal oscillator. I use mikroC compiler.
Actually i already have a ...
1
vote
0answers
101 views
I2C protocol between PIC32mx and Arduino Uno
I am implementing a way to transfer data using I2C protocol between PIC32mx and Arduino Uno. I've decided to establish PIC as master and Arduino as slave. I passed by all the definitions and configs ...
-2
votes
2answers
69 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 ...
-2
votes
1answer
40 views
Pic microcontroller voice recording and playback [closed]
I was wondering we can easily interface LCD, led an pot etc but I couldn't find way how to record my different voice strings and playback specific string as per commands that given to pic
-3
votes
1answer
30 views
Pic output power on issue [closed]
I m using pic16f877a for my projects I face 1 common issue whenever I do projects, when I turned on power of controller it's all output are raised high for instant like a spike and thus all load like ...
0
votes
2answers
92 views
Why is my PIC microcontroller pic16f683 resetting after 2.4 seconds?
I have written the LED flashing light program for a 16F683 microcontroller.
I expected the LED to have a 50:50 mark space ratio. i.e. on exactly half the time. In fact, it is spending longer on than ...
-1
votes
0answers
26 views
First try with a TFT Display-ILI9341 [closed]
i want to use in a project a Display with the ILI9341.
I have the Datasheet just before me but i can´t find how to start...
can me maybe say somebody where the following questions are answered
when i ...
0
votes
3answers
68 views
Stepper motor working
I wanted to know why a stepper motor requires a driver board and can't just run directly by a pic microcontroller
0
votes
0answers
42 views
Programming a PIC (with MikroC)
I have some troubles programming my PIC12F629 and since I'm a newbie in this domain (more a programmer) I'm feeling a bit lost.
In fact I would like to generate a signal through one of the ouput GPIO ...
2
votes
1answer
36 views
i2c undefined symbols on compile MPLab XC8
I am trying to compile a simple I2C program for a PIC18F45K22 using MPLab XC8 compiler. I am getting the error:
:0: error: (500) undefined symbols:
apparently relating to _WriteI2C1, _ReadI2C1 ...
-2
votes
1answer
60 views
Interrupt programming PIC18F4520 :: Toggling LED
[Edit: replaced sideways photo with upright photo]
I recently started using interrupts in pic programming. I started with this program but I am not able to go through what has been done in this ...
0
votes
3answers
48 views
VDDCORE & ENVREG connection when it is not used
I have 2 PIC18 chips the first one :
1- PIC18F46K80 working with 5V supplied from external regulator, it has a VDDCORE pin.
2- PIC18F65J90 working with 3.3V supplied from external regulator, it has ...
1
vote
2answers
39 views
Programming PIC with PICkit3 - do I need enabled MCLR?
I'm working with PIC12F629. It has 8 pins (6 for I/O). I need to use MCLR pin as input pin (for a button), so I have to disable MCLR (I guess).
After first programming I want to be able to program ...
1
vote
3answers
68 views
8 bit PICs: timer1 asynchronous vs synchronous operation
The 8-bit PIC family (I'm working with pic18f46k22) offers some timers (timers1/3/5) that can work in both asynchronous and synchronous modes when clocked from an external source.
The obvious ...
3
votes
3answers
140 views
How to protect microcontroller board 1-wire from accidental +12V connection?
I'm working on modular LED strip driver with one "Master" board and up to 32 "Slave" boards. Each "Slave" board drives one LED strip.
All boards have 3 pin terminals:
- +12V (connected to 50W source)
...
0
votes
0answers
28 views
Recoverging after multiple NACKED USB Bulk Out packets on PIC18
I am building a USB device on the PIC18F4550 highly based on the CDC demo device and I've run into a problem receiving large data packets from a host. The smaller packets work fine with the logic I ...
0
votes
3answers
79 views
Servo control using dsPIC33's Output Compare and Timers
I am trying to control a single servo using output compare and a couple of timers. Timer 2 provides the 20ms period and it controls output compare 1 (OC1). OC1 is running in continuous pulse mode, ...
0
votes
0answers
26 views
ccs pic c: #byte for a nibble
To write to SFRs for SPI one can use the following in CCS PIC C for my PIC:
...
0
votes
0answers
29 views
CCS PIC C: How does getenv() function work for SFRs in PIC?
The getenv() function seems to be almost magical, it can return information about the environment in which the program is being written. One of the ways to use it is to get address of SFRs.
In CCS ...
1
vote
1answer
21 views
Confusion with PIC32MX1XX/2xx datasheet information (clock source for USB)
Maybe there are some experienced "wolves", who could help out to clear out confusion about internal/external clock sources. Particularly, I got lost while reading PIC32 family reference manual, ...
0
votes
1answer
106 views
UART only returns the same character
I am trying to create a program that contains UART using the PIC18f25j50 device. I have attached my creation so far which is a simple program that outputs a single character repeatedly to the console ...
0
votes
1answer
24 views
ICSP CLK/DAT & my 2 buttons
I have a PIC16F684 with buttons connected to PORTA:0 & PORTA:1 which are also used for ICSP DAT & CLK. The ICSP signals are coming from a PIC programmer which I've built using an Arduino. The ...
0
votes
0answers
22 views
CCS PIC C: To use SPI should one use both #use SPI preprocessor and setup_spi()? What is the difference between spi_write and spi_xfer()?
The CCS PIC C Compiler seems to have #use SPI and setup_spi() both doing basically the same thing related to the SPI interface configuration but not taking the same parameters. Similarly, it has ...
0
votes
0answers
56 views
How to light a certain LED based on the value of the potentiometer?
I'm trying to write a program in assembly language that will read the potentiometer as an input and light a certain LED when the potentiometer is reading a certain range of values (i.e. light LED0 ...
0
votes
1answer
57 views
Need help with switch in pic16f887
I have recently started learning to use pic micro controller. I am using pic16f887 mc and for programing using mplabx with xc8 compiler. My micro controller is getting reading from switch and turning ...
0
votes
0answers
28 views
How to Map RPI4(RB4) pin to uart4 in pic24fj128ga202?
I am using PIC24f128ga202 for my project which has four uarts we have successfully mapped three uart using re-mappable pins ,but the fourth uart seems to be too difficult to map to (RS485 ...
4
votes
1answer
230 views
UART Interrupt does not get more than one Char - PIC32MX110F106B
I am really struggling with an UART communication with my PIC32MX110F016. It is the first time I am trying to implement an UART communication with PIC32MX family but I find it difficult and I don't ...
0
votes
1answer
75 views
Problem with lcd - pic interface
I wrote the following code to display a blinking text on an lcd. The code works properly on the simulator but the real lcd doesn't display anything. I attached the circuit diagram I used to connect ...
0
votes
0answers
51 views
AR1020 correct I2C communication protocol
i have a problem in the right sequence of I2C communication protocol to communicate with the attached device
AR1020 Microchip touch controller
so does any one have the idea of the correct sequence ...
0
votes
1answer
40 views
lcd “random fruit” built in function for pic
I'm trying to display a random fruit on an lcd and I was wondering if there's a built in function in the MikroC PRO for pic v.6.4.0 library that does so.
I drew the fruit using the lcd custom ...
0
votes
0answers
26 views
DSPIC30F4011 - Need Help with Sequential 4 channel ADC Scanning
I am working on a project with some friends which calls for several IR proximity sensors to be sampled sequentially (The emitters must be powered up individually)
but I am really struggling with the ...
-1
votes
1answer
82 views
Microcontrollers and Sensors [closed]
Background
I have been looking at different microcontrollers lately, comparing them, seeing what suits my needs most. I am a computer science student wanting to have a go at my own personal project. ...
0
votes
1answer
73 views
Weird Serial Flash Corruption
I'm experiencing a very typical issue with data corruption in a flash chip in a not so typical way. I'm using the M25P16 16Mb serial Flash chip by Micron to log historical data on my device over SPI.
...
1
vote
1answer
134 views
Programming PIC16F88
I've built a simple PIC programmer which works OK on a PIC16F628 but fails on a PIC16F88:
I've checked the VPP voltage and it's within spec (although I had to substitute a 1.8K for the 1.6K to get ...
0
votes
2answers
140 views
4
votes
6answers
579 views
How to remove multiple if else to handle data easily [closed]
I am doing a project which has a custom made board based on PIC32 MCU. It has 30 Inputs and ...
0
votes
3answers
108 views
Is it possible to call Timer ISR when we want it to execute.?
I am using PIC32 and I am doing a timer example. I am using the example of Timer1 provided in microchip documents. My understanding with the timers is when our main program start, timer also start ...
1
vote
1answer
94 views
Oscillator will not start up reliably
I have designed a PCB using a PIC18F6520 and a 32MHz crystal. Using a breadboard with a PIC16F877A, my code works great. But when I load a simple LED blinking program onto my PCB, the LED flickers ...
-3
votes
1answer
129 views
Software i2C communication protocol “MikroC for Pic” halting problem
I work with Pic16f688 , and i do a soft i2C
MikroC for pic compiler does not supply its libraries functions code
this is the whole code i use for MCU
...
1
vote
1answer
159 views
what does `x` mean in PIC opcode format?
I hope this is right place to ask
In PIC mid-range micro controller instruction set
I found this strange formatted op code for the instruction
CLRW 00010xxxxxxx
...
1
vote
1answer
44 views
Power supply for a 3.3v portable device based on dsPIC33FJ128GP804
I have been building a portable device which has as its main components a dsPIC33FJ128GP804 and a graphical liquid crystal display, which is working fine.
The PIC voltage range is specified at 3.0v ...
0
votes
2answers
74 views
I have problem with interrupt on 16f690
I am using pic16f690 and mikroc pro. I want to create interrupt on Rb4 and Rb5 (on those pins I have encoder) and when interrapt came i want to turn on LED.
But compiler gives me a error:
74 317 ...
0
votes
2answers
94 views
Strange behavior of USART in PIC16LF18313
I am using this 8-bit, 8-pin mcu for asynchronous EUSART.
Sometimes when I power it up, it gives me correct characters (e.g. I send 'w', it returns 'w'), but sometimes when I power it up, it returns ...
1
vote
5answers
178 views
Use UART PIC24FJ64GB002
I am trying to setup a PIC24FJ64GB002 for UART communication in MBLAB using XC16. I am using the USB CDC demo to communicate with a device, and I am trying to relay that information to an arduino ...
1
vote
3answers
126 views
Binary Counter C Code for pic16f877a
I'm trying to write a code for an up/down binary counter. The task is to light up 8 leds (up counter)and then reverse the lighting order (down counter). I am trying to create an array of leds in my ...