Questions tagged [microchip]

Questions related to the microchip PIC family of microcontrollers. Where possible please specify the specific microcontroller.

Questions related to the microchip PIC family of microcontrollers. Where possible please specify the specific microcontroller.

696 questions
-1
votes
1 answer

seial communication between GSM and PIC16F877A

Please help I'm trying to prepare a project that need serial communication between PIC16F877A and a GSM sim900 so that I can send and receive sms from a remoteness here is the peace of code to send sms writen in MPLAB XC8 ` …
kassim
  • 3
  • 2
-1
votes
2 answers

How to configure correctly a PIC18 port D for output direction?

I'm developing a firmware to control a PIC18F45k80 pinout on a customized board. Before loading and programming this pic with the final version I was testing my program/debug environment (MPLABX IDE + Pickit3) with the simplest user code: toggle…
Suvi_Eu
  • 255
  • 1
  • 3
  • 16
-1
votes
1 answer

How to malloc a preprocessor directives

I have a macro as follow. #define WR_BLK_SIZE_REGINFO 123 Am using this macro in a library project(.a). Library projects are pre-compiled where the size of "WR_BLK_SIZE_REGINFO" cannot be changed as it is statically allocated in the library…
kaviarasan
  • 115
  • 2
  • 13
-1
votes
2 answers

PIC32 SPI not working

I'm trying to get the SPI working on a PIC32MX250F128D without much luck. I tried in 8 bit mode and 32 bit mode, but I'm not getting all the data or no data at all. I'm trying to use a 4MHz SPI to drive a WS2812 ledstrip. This is the code I…
-1
votes
1 answer

Is there any pre-builded sample code libraries for PIC18F14K50 using "XC8" Compilers only

I want to create an USB interface using PIC18F14K50. I have source code using c18 compiler but I want to update my firmware using XC8 (v1.37) compiler. I am using MPLAB X 3.25. Though the C compiler is giving me good results, I want to make my…
Ravi C
  • 64
  • 2
  • 10
-1
votes
1 answer

Energy effeciency factors for microcontrollers

How microcontrollers can achieve high energy effeciency? Is it by using time triggering, event triggering or using sleep time? What other techniques can be applied to make them effecient?
Jahangir
  • 105
  • 4
-1
votes
1 answer

MCP2210 hid Python - LCD

I have been looking for some solution how i can control LCD display, which is connected via USB. My first result is that i will use MCP2210 -http://www.microchip.com/wwwproducts/Devices.aspx?product=MCP2210 (USB to SPI via HID class). For the…
-1
votes
1 answer

Do USB D-/D+ lines for PIC18 require EMI (RC) filtering?

I recently ran into an issue with USB cable lengths and an FT230XS where I didn't include the 47R and 27pF on the data lines. I'm working on a project now where I use CDC for communication so I have the D+/D- lines going directly to a PIC18F2550. Do…
coolestDisplayName
  • 161
  • 1
  • 2
  • 9
-1
votes
2 answers

UART_Read_Text function for PIC16

I know questions have been asked a lot on this function, but after searching for hours on here I cannot find an answer that helps me figure this out. Here is the function to read in a string through the UART that I'm trying to implement. void…
NickW
  • 1
  • 2
-1
votes
1 answer

PIC in C - push button did not work

I am trying use one pin on PIC12F675 for button, another pin for LED. I wrote this code but button did not work. LED is still on. GPIO0 is connected to +LED, GPIO1 is connected to button, button is connected to ground. Please help. Thank…
Matej
  • 11
  • 1
-1
votes
1 answer

PWM function keeps repeating I have no idea why

So I created this program in MPLABX, I am using it mostly to learn to code in C for future projects. I wanted to put some hardware/ register stuff into functions for neatness and ease of reading. For some reason my PWM function keeps repeating and…
TeslaCeph
  • 1
  • 1
-1
votes
1 answer

Using RA5 in PIC16F1455 as digital output on XC8 compiler

I am trying to get RA5 as digital output. But it does not seem to work. I went through the datasheet and found RA0, RA1 and RA3 are input only. That means RA5 supports both input and output, am I right? Why I can't get RA5 to output digital 1? void…
retromuz
  • 809
  • 9
  • 26
-1
votes
1 answer

Installer for Microchip's 433.92 MHz Wireless Dev Board doesn't work

I can't install the USB drivers for Microchip's Wireless Dev Board. The part number is "DM182017-1" for this kit. I followed Microchip's instructions for downloading the USB driver, but the installer tool for USB provided doesn't work. To see these…
-1
votes
2 answers

Sampling rate for PIC16F688

Please I'm facing difficultly understanding how to calculate the sampling rate of the PIC16F688 for ADC. My clock frequency(MCU) is 8MHz. and I configured ADCON1 to the following: ADCON1 &= 0b01000000; //clear bits 6 through 0 ADCON1 |=…
Ahmed A
  • 71
  • 1
  • 9
-1
votes
2 answers

How Transport a C structure in a Embedded Device to PHP

I have a fairly big (Around 50bytes) structure in a Embedded device to be transported to a PHP script which is to be stored in a DB. Most of the elements in the structure are bits and some are integers and chars. What I plan is use a union in C…
UB_Roy
  • 651
  • 1
  • 6
  • 12