The PIC18 series 8 bit microcontrollers manufactured by Microchip Technology.
Questions tagged [pic18]
230 questions
0
votes
2 answers
Digital Clock C code / PIC, Protues
I'm taking a Microcontroller course this semester, and I have an assignment to make a digital clock using PIC18 and display it on LCD. My code is in C and I'm protues to simulate.
I wrote a code but something is wrong if anyone can help me figure…

Haneen Alkhateeb
- 1
- 1
0
votes
1 answer
Connecting two PIC18F starter kits using USART2
I want to connect two PIC18F starter kits (with PIC18F46J50), using RS232. Since USART1 is already connected to the card reader (integrated), I need to use USART2 (I need to remap RX2/TX2 to RP19/RP20 pins-RD2/RD3).
I already found some demo code…

Victor Badoiu
- 1
- 1
0
votes
0 answers
Assembly Language multiplication overflow
This is my first post so please be gentle. I am trying to get a final answer of
0hD16BC7A and cannot even verify that I have content 0h2A in address 0x10 in the first step. I'm wondering if it has to do with the overflow commented below. Any help…

animatedSponge
- 1
- 2
0
votes
1 answer
Using PIC PORT address in a struct
I was trying to pass PORTs address trough a struct by using a function, by i don't know how to correct work with pointers. Here's the code of my struct and function:
typedef struct {
read:1;
last_read:1;
changed:1;
unsigned short *port; //Here…

Matheus Garbelini
- 37
- 1
- 5
0
votes
1 answer
Is this valid code? extern marked with @ and address, from PIC microcontroller libraries
I used clang to perform some analysis on my code for a PIC18 microcontroller. It gets lots of errors and which seem to be caused by lines in the headers like this.
extern volatile unsigned char ANSELA @ 0xF38;
I understand what this is doing,…

DanUK86
- 33
- 6
0
votes
3 answers
how to burn hex file to pic ? "hardware"
Good evening ..
I'm new in the microcontroller ..
I have studied a course on "pic 16" and As I knew the pic16 needs an external device to burn hex file in rom .
Now I want to study the pic24 And I found something called usb in pic24 ..
Can I burn…

Mohamed Satti
- 23
- 9
0
votes
1 answer
main function keeps repeating itself for no reason
Hi guys please help me out...i dont know why the void main() function keep on repeating itself without any while loop. Onto the LCD first "IN PROGRESS"(status1) is displayed and then "IDLE MODE"(status2) then after 500ms delay "IN PROGRESS"(status1)…
0
votes
1 answer
what is the meaning of __18CXX and __PCB__ in picc codes
I commonly see the following lines of compiler-related codes :
#if defined(__18CXX) ... #endif
and
#if (defined(__PCB__) || defined(__PCH__) || defined(__PCM__)) ... #endif
How can I know the meaning of each one ?

Wazani
- 911
- 1
- 13
- 28
0
votes
1 answer
Unable to write to flash program memory(PIC18F4620)
im trying to write some data into the flash program memory. i read the data sheet and followed the step. And also i edited the linker script for the rom array. below are my codes for flash program memory sequences in C. im trying to write into…
0
votes
1 answer
Why initializes the UART with high priority receive interrupt need to make RCSTA2bits.CREN = 0;
#define InitUART( BRGVal, BRGHighVal ) { \
UARTTxD = UARTTxDInit; \
DirUARTTxD = DirOutput; \
DirUARTRxD = DirInput; …

user3732308
- 11
- 2
0
votes
1 answer
Configure PIC port for input and output
I'm trying to use two pins of Port A on my PIC18F4620, with one as an output and the other as an input. I've written a simple program that should do this. However, when I debug the program on my board, the output doesn't change according to the…

user3512856
- 1
- 1
- 2
0
votes
1 answer
About RealTerm: Serial Capture Program 2.0.0.70
I have some difficulty in using RealTerm Serial System. I want to use this software as GUI to communicate with PIC18F46J50 microcontroller through UART. Firstly I want to program a echo function, but I find the empty area on the top half of GUI…

Timberjack30
- 61
- 1
- 7
0
votes
1 answer
USART of pic18f4550
I'm working on PIC18f4550. I want it to communicate through USART. I'm able to transmit a character but not able to receive any data. I check all the SFR's and r ri8 according to me. I'm using mplab c18 v3.46 compiler and MPLAB v8.40.
#include…

user3396549
- 11
- 3
0
votes
1 answer
modify opcode in PIC18
I wrote a program using c language., In this program, I was able to be accessed by a pointer to a specific address and opcode can print it.I've used this method to write the self modifying code.I did this in 8086 architecture.
I want it running on a…

user3161225
- 47
- 8
0
votes
1 answer
Bootloader Issue
I am having a strange problem with my serial bootloader on PIC18F87J11, the issue is primarily related with the GOTO instruction. I will explain further, first off this is my HEX…

Ammar
- 1,203
- 5
- 27
- 64