Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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".

0
votes
1answer
19 views

Dual DAC channel selection in PIC

I need to communicate with this DUAL DAC by using SPI : MAX 5223 Dual DAC There are 2 DAC outputs in this chip and I am confused that how can I select and write to the specific one. There is CS pin ...
1
vote
2answers
456 views

PIC mathematical operations weird problem

I am trying to display the voltage value on my specific GPIO pin. I use PIC18F26K83. I can read ADC value. ( I tested it and it gives correct results.) ADC_read() ...
1
vote
1answer
55 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: ...
1
vote
1answer
28 views

Configuration in MPLABX compared to MikroC Pro

I need to modify a C code of an PIC18F4550. I want to use the MPLAB X IDE to do the job because I'm more familiar with it. However, the code that I need to modify is accompanied by an introduction ...
0
votes
1answer
30 views

Add Ethernet Switch chip to project based on PIC18F97J60

We developed an Ethernet-connected device that uses the Microchip PIC18F97J60 controller. This particular PIC contains the PHY that allows us to simply connect the chip to Ethernet magnetics and then ...
0
votes
1answer
82 views

Pic Programming - Nested Loops

I'm having some problem with my code and I can't get my two loops working properly. I'm new to C programming so I might have got the basic loop concepts wrong. I've got 10 LED lights connected to my ...
0
votes
0answers
19 views

PIC SPI PPS and pin selection

I need to communicate with a Dual DAC : DAC , by using SPI. I use PIC18F26K83. It is the first time I use SPI so I have some very basic questions: So I have seen that SPI uses 3 PINS: SPI Data Pin, ...
0
votes
1answer
26 views

PIC 18F26K83 ADC clock frequency

Hello I am using PIC18F26K83 and I need to use ADC module in it, in order to measure voltage value of a spesific pin. MCU clock frequency is 8 MHz. This PIC has 12-bit ADC inside of it. So my question ...
2
votes
2answers
48 views

PIC IOC vs INT and the interrupt function

I am using PIC18F26K83 and I want to use interrupts for a switch that will be connected to one of the pins of my PIC. So I have some related questions: There are 2 interrupt options in PIC18F26K83: ...
0
votes
1answer
64 views

Disadvantage of using low resistor value for pull up (Strong pull up)

I was trying to choose a resistor value for a pull-up resistor I will use in my project. The project will have I2C communication and SMBus communication. When I was searching on the internet, I have ...
0
votes
1answer
33 views

PIC18F47K42 I2C Slave MCC code incrementing register by accident

Disclaimer: I have submitted a forum post on Microchip as well as the forum appears to have issues with me and to increase the pool of possible answers I thought of posting here with as much detail ...
0
votes
2answers
46 views

I2C multiplexer channel selection and pull up resistors

I need to communicate with 3 batteries through SMBus. I managed to communicate each of them separately one by one. However, I need to communicate with 3 of them, for that I decided to use multiplexer. ...
2
votes
0answers
43 views

PWM for 7Amp 12Vdc Heater

I'm working on a project that controls 12Vdc 7Amp silicon heater pad using MOSFET. I tried HA210N06 MOSFET with a heatsink but it doesn't work correctly, the heater doesn't get hot but the MOSFET is ...
0
votes
3answers
125 views

Is it possible to play music with a PIC16F628A

Is it possible to generate and send PCM audio from a PIC16 (or an arduino/atmel)? It does have an analog port, so it should work right? And if it does, is the PIC fast enough to generate the ...
-2
votes
0answers
52 views

PIC10F222 asm code builds, but not works as expected [closed]

The problem is that the asm code builds, but not working as expected. Could anyone help me with this problem? The whole code is working with the RELAY SWITCH. Please check the circuit I have attached....
0
votes
1answer
68 views

PIC assigning number to a port

I am confused with assigning number to a specific port. When I try: LATA=31; In this example when I check pins when by one, I get this result = 0b00001010. It is ...
1
vote
0answers
46 views

ZCD with PIC 18LF45K40

I want to implement phase angle control for a single phase ac fan. To achieve that we need a ZCD circuit interfaced with a microcontroller to get a pulse at zero crossing. As our circuit has some ...
2
votes
3answers
114 views

I2C weird data and clock output/input

Hello I am trying to communicate that is using SMBus. So when I try to send a data which was 0x0D and address of the device was 0x16. I see something like that on the data line: And this is how my ...
1
vote
2answers
57 views

SMBus pull-up resistor value

Hello I need to communicate with a device using SMBus. However, I could not choose correct value for pull up resistors. Vdd is 4.9V and I use SMBus. In same conditions for I2C communications I used 2k ...
0
votes
0answers
36 views

PIC I2C clock related problem

I am trying to make an I2C communication with a device by using PIC18F26K83. I use 8 MHz MCU clock. While trying to set I2C clock these options: Use 8 MHz MCU clock & HFINTOSC for I2CxCLK ...
0
votes
1answer
76 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
174 views

PIC32 programming successfully but not working

I am designing my own PCB around a PIC32MM0064GPL028 microcontroller. Breaking down the steps below- I have built a simple breadboard version first, inspired by PIC32MM curiosity development board. ...
1
vote
0answers
30 views

SMBus Read Word Protocol

I want to communicate with a device that is using SMBus. I use PIC18F26K83. I am inexperienced but before that I implemented I2C communication. In I2C communication, what I do in order to write to ...
0
votes
0answers
49 views

Interfacing Audio ADC CS5381 with PICMX250128B

I want a 24 bit resolution AD conversion, so I am using an audio ADC CS5385. I am not in any way working with audio signal, but I just want to get the digital values from the ADC via the I2S interface....
0
votes
1answer
46 views

PIC I2C Clock selection

Hello I will be communicating with a device using SMBus. For this, I will be using PIC18F26K83. Timing is not important for me so I m somehow free to choose any clock frequency for my MCU. Well higher,...
0
votes
1answer
42 views

PIC I2C PPS mapping

I will be communicating with some device via SMBus. I use PIC18F26K83 and I will use RB1 and RB2 pins as SCL and SDA pins. My question is about PPS mapping. In datasheet it says that I need to set ...
0
votes
1answer
79 views

How to drive 2/3 color LED's and circuit schematic

I need to use 2 or 3 color LED for my circuit.(preferably 3 color one). I am going to use PIC18F26K83 to control the LED. However, I am confused how am I going to make it change colour. I think I ...
0
votes
1answer
71 views

SMBus: Is 100 kHz clock a risky frequency?

I will communicate with a device via SMBus. I use PIC18F26K83 for this. In SMBus spec it says clock minimum clock frequency is 10 kHz and maximum clock frequency is 100 kHz. Would it be a risk to use ...
0
votes
1answer
23 views

SMBus v1.1 voltage threshhold value

I am planning to use PIC18F26K83 and communicate with a smart battery that uses SMBus ver 1.1. So from the datasheet of PIC it says I need to choose appropriate input threshhold for SMBus from RxyI2C ...
1
vote
1answer
30 views

RE: Receiver Output Enable and DE: Driver Output Enable pins

Hello I am planning to use LT1785 UART-RS484 transceiver. I will use that chip in order to get RS485 data and convert it to UART signal. So I have read the datasheet but I couldn't be sure. It says ...
2
votes
1answer
51 views

Using pickit 3 with DSPIC30F2010

I'm just learning to use the PIC microcontrollers and am totally confused having no knowledge prior. I am using a pickit 3 and the DSPIC30F2010. I have used to connect them via the circuit as shown ...
-1
votes
2answers
63 views

PIC32 Real Time Clock and Calender. What is a use case? [closed]

I have observed that some PIC32MX micro-controllers have an inbuilt RTCC peripherial. The first feeling i had when i saw this was joy, as it meant i could eliminate a component of my PCB. However ...
1
vote
2answers
65 views

Rs485 to UART convension

I need to send data from one PIC to another PIC by using RS485. As a protocol I use UART. However, I cannot be sure about RS485 transceiver and its circuit. I will be able to supply 5 V and according ...
-1
votes
0answers
60 views

Using a coin vibrator on a PIC18 MCU

I was wondering how could I add a vibration to a PIC18F45 MCU so that when you touch a key, it would vibrator? I would like to use a dedicated pin from the MCU. Here is an example of a vibrator ...
0
votes
1answer
50 views

Visualise a bit pattern

My objective is to send a bit pattern of 1000 bits from one microcontroller (PIC or Atmel) to another one using the SPI method. How can I visualize the bit pattern so I can find the errors of ...
0
votes
0answers
26 views

SMBus Address and BaudRate

Hello I need to communicate with some batteries ( BT-70791CK from BrenTronics). They use SMBus ver 1.1 for communication, but in datasheet of the batteries there is no information about the SMBus ...
0
votes
1answer
58 views

UART TO RS-232 convension

I am working on a project and I use several PIC18F26K83's for this project. For communication between PIC's I use UART. Now I also need to send data with RS232 to the user. As I have understood the ...
0
votes
1answer
32 views

When to monitor UxSTAbits.TRMT and UxSTAbits.UTXBF

According to the reference manual on UART for PIC here(page 7), the UxSTA register have two read-only bits; TRMT and UTXBF. While writing a simple transmission program over UART, I didn't notice any ...
0
votes
0answers
12 views

In PIC18F4550,But CCP1 Compare Interrput using Timer1 is not working in Relaese Mode but works if use debug mode with pause & Start

I am using PIC18f4550. I am using Timer0 for time keeping which alone works fine. I have tested CCP1 interrput using TImer1 for pulse generation. It also works fine. When I mergred Timer0 time ...
0
votes
1answer
53 views

PIC18F26K20 PWM Configuration

I am working with PIC18F26K20 and MPLABX IDE. I wrote some code for configuring and running the PWM. However, The output I get is at 50 percent duty Cycle no matter what duty cycle I provide the ...
2
votes
0answers
57 views

PIC32 having multiple PORTB's “high” at the same time

I am trying to set a couple of PORTBbits to "high" (1) at the same time for that I am using the following code: I am using thePIC32MX695F512H ...
0
votes
1answer
54 views

MPLAB X __delay_ms() hangs on PIC16F77A

I'm trying to use the __delay_ms() function to make an LED blink on the PIC16F77A. The reason I think it stalls on the __delay_ms() function is because whatever I set RB0 to before the delay ...
0
votes
1answer
65 views

Proteus simulation problem (beginner) - “Power rails 'VCC/VDD' and 'GND' are interconnected in net GND” errors

I'm a beginner to microcontroller programming and the Proteus simulator. I'm following this "PIC MicroController Volume Adjuster Program(Proteus 8 Stimulation)" Instructables project. When I pressed ...
1
vote
1answer
49 views

RETLW 0 and RETURN command on PIC10F222 microcontroller

When I am building a code in MPLAB X IDE v5.15 I get an Warning "Substituting RETLW 0 for RETURN pseudo-op". As I have researched the PIC10 series don't have return command so it changes to RETLW 0. ...
1
vote
2answers
37 views

DSPIC33EP AN1307 application note source code

I've downloaded source code of an application note from Microchip's web site (AN1307). In order to try it, I created a new project in MPLABX. Then I added all source and header files that I've ...
1
vote
0answers
87 views

PIC10F222 Failed to program device

Every time I try to program my hex file I get an error: The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x3b configuration memory program memory ...
4
votes
3answers
278 views

How to define 14-bit lookup table for PIC/XC8 (if it's possible to do without assembly)?

I'm writing the firmware for a simple testing device that would need to store a very large lookup table (I need 13500 entries with values 0..100 decimal). The target PIC MCU is PIC16F1829 (8K words of ...
0
votes
2answers
60 views

PIC12F675 micro controller programming

I want to use PIC12F675 to control a relay such that when a switch is pressed, it should generate an output signal which should be ON for 2 seconds and then OFF for 15 seconds. This should continue ...
0
votes
1answer
51 views

PIC MCU and LCD display 16x2 - strange behavior

I have a LCD display 16x2 connected to a PIC32MX470F512L. On PIC32 I configure all the 6 pins used to interface with the LCD as open drain outputs on 5V tolerant pins, I have 4.7K pull-up on each line ...
0
votes
3answers
150 views

PIC16f88 not debugging

Disclaimer, i am more or a hardware designer and not so much a coder, i can code but i'm not the most proficient at it. I have a project I'm working on that has a portion of the code that appears to ...