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
-1
votes
1answer
200 views

how to display an output variable from a speed sensor to a 7 segment display in C. DSPIC33E

I have just started an electrical engineering degree and been set an assignment to create a closed loop motor speed control system in C programming language. The PIC is a DSPIC33E (BLO032) and the ...
0
votes
3answers
3k views

How to connect a dsPic30f2010 to pickit3 icsp

I recently bought a pickit3, I have a development board for the dsPIC30f but it the pickit3 doesn't seem to be able to read the chip. When I try to connect to the chip, I have the error: Target ...
2
votes
4answers
2k views

External oscillator problem

I have this sample program to blink LED with PIC18F4550 using external oscillator. I'm using a 20.000 MHz crystal oscillator with 30pF capacitors. The problem is when I wire the capacitors the the ...
1
vote
1answer
75 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 ...
11
votes
5answers
6k views

How does a microcontroller "remember" a program?

This is something thats really bugged me since I've graduated. We programmed PIC16f877a micrcontrollers in class but never got into the how it works, just the make it work. So let's say I write a ...
1
vote
2answers
64 views

Source Impedance Consideration for ADC

I recently used accelerometer ADXL335 in my academical project, this sensor gives analog output. I interfaced this sensor with microcontroller PIC18F458 using ADC module. It was successfully ...
0
votes
0answers
2k views

Makefile error with my MPLAB X

I am working on a PIC24 project, and I went to the project folder and moved a file to another directory inside the project folder, however, I got a makefile error. I created a new project and copied ...
8
votes
6answers
8k views

PIC16F628A Resetting after relay turned off

I am having problems with controlling a relay with load on it. I am using PIC16F628A. The problem is following: The relay has load. At first it is off. When the microcontroller's output is on, the ...
0
votes
1answer
358 views

dsPIC33 oscillator and timer configuration

I configured my dsPIC33 oscilator to operate at 60MHz using a 15MHz external crystal. So, to confirm the configuration, I did a routine to oscilate a pin, high and low, with a 2us period. But it seems ...
5
votes
3answers
2k 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: +...
0
votes
1answer
62 views

Button is giving me the same voltage when pressed or released

I am doing a simple program with my PIC (PIC24FJ1024GB610). When a button is pressed the LED is turned on, when it is released LED is turned off. I presumed that the input pins have a pullup resistor ...
0
votes
1answer
63 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 ...
0
votes
2answers
119 views

Can I dim my LEDs even more?

I have a PIC16F1828. I am using PWM in order to control brightness of bunch of LEDs. My goal is to dim those LEDs to the maximum point. Currently they are not dim enough. System clock runs at 32Mhz....
1
vote
1answer
46 views

Sensor input calibration for wider range

I get minimum voltage output from my sensor as 2.2V and max voltage as 2.65V. I want to change this voltage to 0-5V range so that the controller ADC can calibrate input in a wider range. How can I do ...
0
votes
1answer
47 views

Connecting a PIC32MZ with an Android tablet via USB

I have an Allview tablet running Android I want to connect to my board using USB. An application on the Android tablet would control the micro which in turn would control a bunch of relays and read ...
7
votes
4answers
5k views

Is this a correct way to have a 1 second delay?

If I have a PIC24 with a 4 MHz frequency. Is it accurate to have a 1 second delay by having 4 million clock cycles? I made a 1 second delay like this on my PIC24FJ128GA010: ...
0
votes
2answers
349 views

Reading a single byte using 3 wire interface

I am trying to communicate with DS1302 (RTC) using P16f877A MCU. I tried to read a single register (let say Hour-register) of DS1302 and put its value on a certain PORT/LCD. But I am doing something ...
2
votes
2answers
259 views

PIC MCU: XC8 Not treating TMR0 as a 16 Bit Register

I recently finished a project programming a PIC18F2620. All was good, but I decided to explore the new stuff Microchip has to offer, and am now trying out the PIC18F47Q43. I'm getting a strange ...
1
vote
3answers
124 views

How to connect two current sensors together?

I have two ACS712 current sensor modules, sensing different things, connected to a PIC 12F683. I'd like the PIC to do something if either of them senses a current. Individually, the sensors work ...
0
votes
1answer
69 views

PIC16F877A not working with 4MHz oscillator

I was trying to do a LED flashing program, but the LED didn't turned on. I tried also with a program to just light the LED, but it didn't work either. I searched and one solution says to change the ...
1
vote
2answers
50 views

I2S on dsPIC gets interrupt on both left and right channels, how to distinguish them?

This is hopefully not too silly question: I did set up the dsPIC33CK256MP503 to work with audio microphone via I2S, and it does interrupt for each 32-bit data as expected. There is per I2S standard ...
0
votes
1answer
141 views

I2S on dsPIC generates signals, but interrupt is giving a problem

I am working with SPH0645LM4H-B MEMS microphone with I2S output. I successfully set up the SPI on dsPIC33CK256MP503 to the point, that it outputs the I2S clock at a rate 2MHZ, and WS control signal. ...
3
votes
2answers
625 views

SDCC generates invalid programs for PIC 16f628a

I've been learning how to code for PIC 16f628A and I wrote a very simple code to turn on a LED, which is connected to RB0, and keep it on. My original intention was to use SDCC and GPUTILS to compile ...
1
vote
1answer
76 views

Darlington transistor for driving coils

I try to drive two small pcb coils. The coils have a resistance of around 14 Ohms (i dont know the L value). I have a PIC10F200 controlling the base of a BCV27. However i dont seem to get much more ...
1
vote
2answers
308 views

PIC10F206 MPLAB X IDE v5.40 - Light a LED

I am trying to light a LED with a PIC10F206, a PICkit4, the IDE MPLAB X IDE v5.40, and the pic-as Assembler. This is what I tried: ...
1
vote
2answers
333 views

Why the ADC conversion causes the analog input pin of PIC to be grounded at the beginning of the conversion?

using MPLAB X IDE v5.35 PIC16LF19176 I used PIC ADC analog inputs several times, the conversion always gives me the proper results. Looking at the input with the scope confuses me. The scope channel ...
0
votes
1answer
132 views

Wrong data displayed from UART connection

I have trouble displaying a certain hex string on an LCD. The hex string comes from a external display device that communicates with a serial display. With the oscilloscope, the data from the display ...
0
votes
2answers
159 views

PIC10F206 - p10f206.inc file not found

I followed a tutorial to get into pic microcontrollers. But all code in tutorial supply me with errors. For example if I use this code as a first line of my assembly file: ...
0
votes
1answer
733 views

PLL with PIC18F4550 [closed]

I have to do the things ICs in the SE/NE560 series do with PIC18F4550. I mean I will provide two input signals with different frequencies and this two input will be synchronized. This is what we want ...
0
votes
0answers
47 views

How to receive a startup hex string during a debug session?

This is my setup: I have a 'smart display' connected to the serial interface of a PCB with a PIC microcontroller. The PIC powers the smart display. This smart display uses a boot mechanism. When the ...
0
votes
1answer
12 views

KSZ8081RNACA phy address setting up

I have following PCB design, which use PIC32MZ2048EFH144 and KSZ8081RNACA, I want to set up phy address to be 3. From document it has following words "Config Mode: The pull-up/pull-down value is ...
0
votes
5answers
236 views

PIC processors - assembly vs. C?

I have heard that earlier PICs that are quite tiny are to be programmed using assembly and not C. Later PICs had hardware instructions to make them easy to be programmed via C language. However, I am ...
0
votes
0answers
72 views

Ch376 USB Module with SPI

What is the problem here, I used logic analyser to check the data and commands i send to the Ch376 USB Module, And all are right, But the module is not responding with any reply, Just return back the ...
0
votes
0answers
64 views

RFID-RC522 with pic16F628A

I want to connect a RFID-RC522 with pic16F628A microcontroller. The only tutorials I could find are those that have RFID-RC522 connected with arduino. The reason why I want to use RFID-RC522, is ...
0
votes
0answers
114 views

Matlab GUI interfacing with pic18f4550

My project consists on collecting usb data form the uC PIC 18F4550 to show them using GUI Interface well I am using for the simulation MikroC for PIC programmation as well as Proteus, I compiled my ...
3
votes
0answers
215 views

Mplab X IDE insists I'm trying to change protected boot memory even though all CodeGuard options are disabled

I'm new to this whole thing, so forgive me if I'm missing something obvious, but the only relevant thing I could find is over 9 years old, using a different programmer and different PIC. I'm using ...
1
vote
0answers
96 views

DC-DC boost converter resets mcu

Edit: A p-channel mosfet to keep DC boost circuit separated from main circuit until its charged worked like a charm. I'm trying to build a DC-DC boost converter, controlled by a 200kHz PWM signal ...
1
vote
1answer
1k views

Floating Point problem using PIC18F4550

I'm making an obstacle avoiding robot and using the mentioned PIC controller. I'm currently not at the obstacle avoiding part so what i'm doing is writing code to control the movement, e.g. making it ...
0
votes
1answer
124 views

Timer0 in PIC18F26J50

I have a PIC18F26J50 and I want timer0 to output a 1Hz signal on RA6. I'm now getting ~800Hz with my current setup. Clock is 48MHz / 4 = 12MHz on RA6 (if INTOSCPLLO is enabled). Compiler is C18. Here ...
0
votes
2answers
205 views

PIC microcontroller bit specific adressing beginner question.. PORTBbits.RB0 or just RB0?

In a PIC microcontroller, people use PORTB to access all pins of the PORTB at once and PORTBbits.RB0 for bit specific addressing, for me RB0 itself is working, why not I use that instead of PORTBbits....
1
vote
1answer
177 views

PIC's DAC buffer

I'm designing a circuit that exploits the DAC available in the PIC16F18344 and the datasheet (as well as other Q&A here) suggests to put a buffer on the DAC output because it can provide only a ...
1
vote
3answers
148 views

Understanding word and instruction on simple microcontroller

From what I'm reading in this CircuitBread tutorial, the microcontroller PIC10F200 has flash memory of 256 words. PIC10F200 has a constant word unit of 12bits and so the maximum program size I can ...
0
votes
0answers
45 views

DC-DC Boost Converter Only Works with a Second Supply

I'm trying to build a 5V to 8V boost converter to use at another mosfet's gate voltage. I'm using a PIC mcu to create a 50kHz square wave signal to switch the BUZ101L. For test purposes i also added a ...
0
votes
1answer
60 views

Problem in editing EEPROM of MLX90614ESF sensor , pic 18f4620 , I2C communication

I want to edit Tomax and Tomin in the EEPROM 0x00h and <...
7
votes
2answers
3k views

What does this CAN bus waveform mean?

I am trying to get the ECAN functionality working on a dsPIC33. I have two identical dsPIC33s, each with identical CAN transceivers connected by a short (3 inch) bus. One is transmitting, one is ...
1
vote
1answer
123 views

Different voltage differences for a UART signal (when tested from one microcontroller, vs when tested between two microcontrollers)

I have a question regarding UART signals. I am doing a project where I press a pushbutton (BTN0, BTN1, BTN2) it registers at a microcontroller (MSP430FR6989), transmits a signal to another ...
0
votes
0answers
43 views

I couldn't figure out why are the LCD connections are not working

I defined the LCD connections but the code (written below) still gives me these errors (mentioned below.) I could not figure out the reason (I am new in microcontrollers.) //PS: This code is intended ...
4
votes
2answers
14k views

Pre-Defining EEPROM Values in XC8 Compiler

I'm working with a PIC16F690, using Microchip's XC8 compiler. I want to embed EEPROM values into the hex file, so that the EEPROM gets programmed at the same time as the program memory. I've done ...
25
votes
7answers
40k views

Internal or external oscillator

I always use the internal oscillator that pics have as I have never found the need to run anything at higher frequency than 8 MHz (which is the fastest the pics I use tend to be able to go). Are there ...
1
vote
1answer
154 views

Understanding PIC MCU memory from datasheet

Being new to PIC, I have been struggling to understand the information in the datasheet. Q.1. : What does "256 bytes Linear Data Memory Addressing Memory" mean? I am looking at the ...

1
3 4
5
6 7
53