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
0
votes
1 answer

Where is there a key to microchip mplab source editor syntax color highlighting?

I must be missing something obvious, but, in spite of a lot of internet searching, I cannot find a key to the colours used for syntax highlighting in Microchip MPLAB source code editor. I am sure that interpreting these will help me discover an…
Harry Weston
  • 696
  • 8
  • 22
0
votes
1 answer

Combination of chipsets

I have a question regarding the capability of the combination of different chips. We have a PIC16F1824 microchip controller, is it possible to connect this with the bluetooth module from…
Tim Lodder
  • 271
  • 2
  • 5
0
votes
3 answers

Accessing functions in an ASM file from a C++ program?

Over here I asked about translating an ASM file to C, and from the responses it looked like there was no reasonable way to do it. Fine. So one of the responses suggested I just make use of the functions as-is and be done with it. Sounds good. But…
Steven
  • 576
  • 1
  • 5
  • 12
0
votes
1 answer

Hitech C data buffers in program memory

The C18 compiler allows variables in program memory with ROM qualifier, but the Hi-Tech C seems rather reluctant to utilize the Havard architecture to its best. So is there a way to create data buffers in program memory with the Hi-Tech C compiler…
Vishnu
  • 33
  • 4
0
votes
1 answer

Writing to OC8R/RS causes INT4 to unexpectedly trigger

The title is pretty much self explanatory. When I write to the Output Compare Register (OC8RS or OC8R), an interrupt on the External Interrupt INT4 pin is triggered. I'm using the Timer3 & OC8 modules for PWM. The INT4 pin is connected to a physical…
The_Ders
  • 137
  • 9
0
votes
1 answer

XC8 compiler error "no identifier in declaration"

I recently took over some C and firmware responsibilities at work, and am having trouble with what seems like a basic issue but one that I can't find the answer to. I'm not very experienced with C, but I've had many years of experience with higher…
kingcoyote
  • 1,145
  • 8
  • 21
0
votes
2 answers

ORG Function assembly block in C18

Hi there stackoverflow. I'm working with pic 18f4550 with bootloader. Because of the bootloader i need to start de code in a specifed address in the memory. In this case 0x1000 because i dont have any interruptions. This is my code so far…
Etraud
  • 19
  • 1
  • 5
0
votes
4 answers

Why do I need this line, it is redundant as far as I can see

Below is a section of code that I use for parsing tokens. There is a line indicated with >>>> near the bottom that is no longer required, but if I comment it out, the cmd_parse_value_lookup() function fails. If i leave it in, the code runs properly.…
Graham
  • 318
  • 1
  • 16
0
votes
1 answer

Setting Date and Time in TCP/IP Stack Microchip

What is the best way to set the date and time to the real time clock (RTCC)? Can you pull a current time based on the location of your IP address or do you have to set it manually. If you set it manually what is the best way to have your user set…
Nate Norman
  • 129
  • 1
  • 12
0
votes
2 answers

Multiple handlers reusable code

Can some please suggest an alternative to using two different handlers in the one activity, or let me know that this method is OK? Details: I'm in the process of developing some code for use with Microchips ADK Android starter kit. Everything is…
PaulEaster
  • 5
  • 2
  • 4
0
votes
1 answer

Microchip: How to load more then one HEX file in MPLAB X

I use MPLAB X (sometime MPLAB 8) and i get some project to finish. I have these HEX files: bootloader.hex magic_flag.hex Bootloader is loaded from address 0x0 to 0x7FF. The magic flag has position in address 0x40 (so in bootloader area). And now I…
Lodhart
  • 635
  • 2
  • 9
  • 13
0
votes
1 answer

PIC 16F88 ADC example?

So I have a PIC 16F88, and I managed to do a couple things with it, but now I was wondering how to get analog to digital conversion? I've tried many examples out there in the internet, but no success :( if anyone could give a light on how to use the…
RicardoE
  • 1,665
  • 6
  • 24
  • 42
0
votes
1 answer

PIC18f452 port listening issue

Why doesn't this code work? All that I want is portb to toggle when I press a button. main trisb=0 trisa=0xff while true if ra0<>0 then portb = not portb end if wend .end
0
votes
1 answer

No interrupts being triggered in UART Receive on PIC18F2680

I have been working with this code for days and cannot figure out why my interrupts are not being triggered. I know data is coming through successfully because I used a probe on a logic analyzer, also my baud rate is correct as I can transmit with…
J2N
  • 321
  • 4
  • 19
-1
votes
2 answers

Is the order of free-ing the allocated memory important? (C language)

I'm coding in C language for PIC32 microcontroller (there is no OS, the compiler is Microchip XC32 v1.33). I use dynamic objects (created by malloc function) but from time to time (not always) I experienced crashes. After much testing it appeared…
Jarek
  • 15
  • 4