pic Questions
3
Solved
I recently came across this piece of code in an interrupt service routine (ISR):
#define MAX_CHANNELS 4
static uint16_t volatile* ADCVALS[MAX_CHANNELS] = {
&ADC1BUF0, &ADC1BUF1, &ADC1B...
Etoile asked 10/10, 2022 at 8:13
2
Solved
I am relatively new to working with PIC chips, so this might be a novice-level question, but I am attempting to write a header file containing, among other things, the TRIS/ODC/INIT masks for all o...
Tintype asked 14/1, 2020 at 21:56
6
Solved
What is the best way to reset a PIC18 using C code with the HiTech Pic18 C compiler?
Edit:
I am currenlty using
void reset()
{
#asm
reset
#endasm
}
but there must be a better way
8
Solved
I already read the datasheet and google but I still don't understand something.
In my case, I set PIN RC6 of a PIC18F26K20 in INPUT mode:
TRISCbits.TRISC6 = 1;
Then I read the value with PORT and L...
4
Solved
I found this header file for PIC microcontrollers by the name of pic1250.h and I'm unable to get the hang of some syntax used in it.
The source for the file is:
/*
* Header file for the Microch...
Eloyelreath asked 11/4, 2013 at 18:10
4
Solved
I posted this a couple of days ago on the Microchip Forum (here) but the only response has been crickets.
The I2C code below works most of the time but occasionally on power-up there is a bus colli...
3
Solved
I tried to fit an implementation of NSA's SPECK in a 8-bit PIC microcontroller.
The free version of their compiler (based on CLANG) won't enable optimizations so I ran out of memory. I tried the "t...
8
Solved
I am looking for a good C compiler for the PIC 16 family, working on Windows.
A couple of colleagues use bknudc but some seem to dislike it. Apparently you cannot use the linker efficiently, and ...
Ineducation asked 23/6, 2009 at 6:49
2
Solved
I am new to writing firmware for 8-bit PICs and could use some help with my code. I am using a PIC16F1829 for an LED module which gets RX commands. I am just trying to get the basics setup like tur...
2
Solved
I am trying to force the linker (ld from XC32) to place the same executable code in two different sections of flash.
The application is so that the code can be run as a standalone application, an...
0
I was trying to enumerate usb cdc device using pic24fj128gb206.
Device seems to be enumerated properly.
But when I connect my device to Linux PC, I am getting the below warning message from kernel...
3
void __attribute__((__interrupt__, no_auto_psv)) _T1Interrupt(void) // 5 Hz
__attribute__ directive or macro is from GCC but __interrupt__ and no_auto_psv is not , it's specific to a hardware. So...
2
Solved
When I declare a function that accepts const char* and I pass a string literal, I get a
Warning: [2066] type qualifier mismatch in assignment
because string literals are rom const char*. It's ...
Loverly asked 17/5, 2011 at 1:49
1
Solved
In pic microcontroller TRIS register determines whether port would act as input or output and PORT register would determine the content, what should be written (in case of output) or read (in case ...
Entail asked 15/12, 2014 at 7:19
3
Solved
I have inherited some heavily obfuscated and poorly written PIC code to modify. There are two macros here:
#define TopByteInt(v) (*(((unsigned char *)(&v)+1)))
#define BottomByteInt(v) (*((uns...
13
How does one create threads that run in parallel while programming PIC18, since there is no OS?
Histopathology asked 26/10, 2009 at 11:14
1
Solved
Free PIC C compiler
PIC16 C compiler
...aaaaand noone mentions gcc*. Googling lead me only to flame wars over the forums if PICs are suitable for C, and that their (at least the 6 - series) 30 inst...
1
Solved
I am trying to make a bootloader for PIC18 so I need to understand how to process a hex file correctly. For example I understand what to do with the following hex line.
:040C0000E2EFFFF030
04: ...
Shrinkage asked 27/12, 2013 at 21:23
3
I'm looking for an interpreted language that work on microchip PIC32.
Currently, I found that LUA and PAWN are working but before choosing I would like to know if some other languages are known to...
3
Solved
How to reduce the code space for a hexadecimal ASCII chars conversion using a small code space?
In an embedded application, I have extraordinary limited space (note 1). I need to convert bytes, fr...
Rockrose asked 12/6, 2013 at 16:46
6
I am looking for a free, and possibly open source C compiler for PIC. I might go without C, but I would like to get both options.
There are various compilers out there, but since I have neve...
Mullen asked 2/2, 2010 at 15:33
1
Solved
1
Solved
Suppose I am developing a fail-safe mechanism for Arduino (Or any other microcontroller). In other words a secondary microcontroller or a seperate board should get the responsibility when the prima...
Aardwolf asked 15/10, 2012 at 10:48
7
Solved
As a hobby project to keep myself out of trouble, I'd like to build a little programmer timer device. It will basically accept a program which is a list of times and then count down from each time....
Reprovable asked 29/8, 2009 at 14:41
1
Has anyone managed to configure VS2010 to build and debug embedded projects on PIC32 microcontrollers? Are there any tutorials out there?
Using WinGDB i can connect to a gdb server to step through...
Inman asked 30/3, 2011 at 23:21
1 Next >
© 2022 - 2024 — McMap. All rights reserved.