How can I program this PIC16F18345 in C language?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User11957
Level 1
Level 1
5 questions asked First question asked
Hi dear members,
I am new to microcontroller programming. I want to program PIC16F18345 microcontroller using C language on MPLABX IDE, XC8 compiler.
PIC16F18345 as a Embedded - Microcontroller was manufacturered by Microchip Technology. Maybe you have already know this.
Here are some Specifications of PIC16F18345 microcontroller :

Operating-Temperature: -40°C ~ 85°C (TA)
Supplier-Device-Package: 20-SOIC
Number-of-I-O: 18
Speed: 32MHz
EEPROM-Size: 256 x 8
Core-Processor: PIC
RAM-Size: 1K x 8
Program-Memory-Type: FLASH
Peripherals: Brown-out Detect/Reset, POR, PWM, WDT
Connectivity: I2C, LIN, SPI, UART/USART
Voltage-Supply-Vcc-Vdd: 2.3 V ~ 5.5 V
Core-Size: 8-Bit
Program-Memory-Size: 14KB (8K x 14)
Data-Converters: A/D 17x10b, D/A 1x5b
Oscillator-Type: Internal

Please let me know good online tutorial where I can learn to program above said microcontrller in C language.
I mean how to add headers, which header for what purpose and how to add libraries and what all libraries are available.
I also need example sample program for pic16F18345 (http://www.kynix.com/Parts/165256/PIC16F18345T-I%2FSO.html).

One example, if i need to compile a program with pointer, an array what all needs to be done on mplabx ide selecting pic16f18345.
int a[5]={1,2,3,4,5};
void main(void)
{
int *p,i;
p=a;
for(i=0;i<5;i++)
printf(“%d”,*(p+i));
}


In the same way, how to write complex program? Please let me know the tutorials.
Thanks & regards,
0 Likes
1 Reply
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
You would be better served posting on this forum http://www.microchip.com/forums/
0 Likes