Questions tagged [pic]

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology.

PIC is a family of modified Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller". wikipedia


For questions regarding Position-Independent Code, use instead.

1624 questions
4
votes
1 answer

Do I have to disable interrupts while in one?

Do I have to disable high interrupts while inside one, if I am using multiple interrupts on the Microchip C18? Consider the code below: #ifndef OTHER_INTERRUPT_H #pragma interrupt InterruptHook // interrupt fname void InterruptHook(void) { …
Christian
  • 1,548
  • 2
  • 15
  • 26
4
votes
2 answers

Writing to EEPROM PIC?

I'm working on a project in which i need to be able to store a value to the PIC's EEPROM, I have managed to get the read to work but so far i am unable to get the PIC to write to the memory using PIC assembly. This is the code that i have been using…
Sam Castledine
  • 105
  • 1
  • 2
  • 9
4
votes
5 answers

PIC C - What's the purpose of this?

In Microchip TCP/IP stack we encounter the following code: while(1) { AppConfig.MyIPAddr.Val = MY_DEFAULT_IP_ADDR_BYTE1 | MY_DEFAULT_IP_ADDR_BYTE2<<8ul | MY_DEFAULT_IP_ADDR_BYTE3<<16ul | MY_DEFAULT_IP_ADDR_BYTE4<<24ul; …
Victor
  • 41
  • 1
4
votes
3 answers

Ruby for the PIC32 Microcontroller

Is there an existing library to write code for the PIC32 in Ruby? Currently I've been writing code in C to perform tasks on it, but I would love to use Ruby. Thanks, Andy
ardavis
  • 9,842
  • 12
  • 58
  • 112
4
votes
2 answers

PIC32 bluetooth

I want to implement bluetooth communication on my final bachelor project, but I'm having a lot of doubts. One of the requisites of this project is to have a Java application that can talk to the micro via Bluetooth. After a lot of research, I've…
rnunes
  • 2,785
  • 7
  • 28
  • 56
4
votes
2 answers

MPLABX 5.40 MPASM Assembly PIC

I would like to ask about your experience with MPLABX 5.40 supporting MPASM on a 64bit windows machine? I can't see it in the listed compilers when creating a new project (I see only XC8 compiler). I've been crawling through forums for a dood…
Tomáš Buchta
  • 366
  • 3
  • 8
4
votes
2 answers

Understanding Frequency / Oscillation of a Chip

I have literally no clue what it is. Wouldn't even know how to go about finding what it is. I would greatly appreciate any help.
Jimmy Page
  • 79
  • 1
  • 7
4
votes
3 answers

Do we have a '@' operator in embedded C or embedded C++? If yes, what is the explanation for the below code?

Code: static volatile unsigned char TMR0 @ 0x01; static volatile unsigned char PORTA @ 0x05; static volatile unsigned char PORTB @ 0x06; static volatile unsigned char PORTC @ 0x07; This code is from the HT-PICC compiler, pic.h library file for…
Electro Voyager
  • 107
  • 1
  • 8
4
votes
3 answers

xc8 random number before programming

im producing 100 remote controls using pic16f1823 and i need unique id for each remote but it should be constant over time so i think its better to generate a random before programming in mplab compiler and then compile these 100 remotes i want not…
4
votes
2 answers

dsPIC33 updating PWM duty and frequency

I am trying to control a H-bridge converter using one PWM generator for each diagonal (PWM1 and PWM4 in my case). I want to be able to control both frequency and duty cycle. To do so, I generate a trigger interrupt at the beginning of PWM4 period,…
4
votes
1 answer

For wall powered IoT device what are the best ways to read data and send commands

I have a internet connected IoT device (let's say advanced internet connected weather sensor, which can send sensor data and perform some advanced operations like rotating, switching on, opening valves/and few other operations). EDIT: The device is…
Dimitry K
  • 2,236
  • 1
  • 28
  • 37
4
votes
1 answer

Erasing flash memory in blocks (1024 bytes)

I am working on making a bootloader. I have to erase 1024 bytes of memory before I write anything to those registers in that block. Even if I want to write 2 bytes, I am forced to erase 1024 bytes. My problem is that I don't know where each block…
Ammar
  • 1,203
  • 5
  • 27
  • 64
4
votes
4 answers

Interfacing PIC Microcontroller with Java on PC using USB

HI! I want to interface PIC18F4550 with Java program and make it cross-platform initially. There are only one way I now Java has is javacomm. But i want it to be USB because not every laptop has RS232 port nowadays. Waht are the ways of interfacing…
Dmytro Leonenko
  • 1,443
  • 5
  • 19
  • 30
4
votes
1 answer

MinGW relocation table

I try to enable ALSR on PE exeuctable compiled in 8 64 MinGW environment. Options Wl,--dynamicbase and Wl,--pic-executable don't help. There is no relocation table in produced executable. I also tried option -Wl,--emit-relocs, but it didn't help. Is…
4
votes
2 answers

One Wire Problem

I need your qualified help! I'm programing in C++, using a PIC 18F87J50 and trying to connect DS18B20 at my H0 Port! I think my underlying programing is correct so.... the problem I have (think I have), is when performing a ROM Command, I'm…
Christian
  • 1,548
  • 2
  • 15
  • 26