Giter Club home page Giter Club logo

pic16-projects's Introduction

Libraries and Projects for the 8-bit PIC16 Microcontrollers written in C and Assembly

This is the repository structure

01_C :- Contains Libraries and Projects written in C (XC8)

02_Assembly :- Contains Libraries and Projects written in Assembly

When you download your repository and open the project be sure your target and compiler selected are accurate.

Be sure to check out the blog for more electronics projects:

http://trinirobotics.com/

If you are new to PIC microcontroller programming then make sure and pick up a copy of the book Programming PIC Microcontrollers with XC8:

https://www.apress.com/gp/book/9781484232729

C Libraries and Projects using PIC16F1717/PIC16F1719 Microcontroller

  • 00_Documents: Contains datasheets, pinouts, errata and XC8 compiler users guide

  • 00_Output : (PIC16F1) Use I/O pin as output

  • 01_Flash : (PIC16F1) Flash an LED

  • 02_Internal_Pullups : (PIC16F1) Use internal pullups

  • 03_Pushbutton : (PIC16F1) Use a pushbutton

  • 04_Timer0 : (PIC16F1) Internal Timer0 module

  • 05_Counter : (PIC16F1) Use the counter module

  • 06_Interrupts : (PIC16F1) Use and interrupt with Timer0 module

  • 07_Internal_External : (PIC16F1) Demonstrates pushbutton interrupt

  • 08_Sleep : (PIC16F1) Sleep mode demonstration

  • 09_Watchdog_Timer : (PIC16F1) Uses the internal watchdog timer

  • 10_Peroidic Sleep : (PIC16F1) Perform a task then go to sleep

  • 11_IOC : (PIC16F1) Demonstrates Interrupt on change

  • 12_Comparator : (PIC16F1) Uses the comparator module

  • 13_FVR : (PIC16F1) Uses the internal fixed voltage reference

  • 14_DAC_8_Bit : (PIC16F1) Digital to Analog Converter (DAC) demonstration

  • 15_HD44780_LCD : (PIC16F1) Library for the HD44780 and compatible LCDs

  • 16_ADC : (PIC16F1) Analog to Digital Converter (ADC) module demonstration

  • 17_OneWire : (PIC16F1) Uses the one wire interface for DS18B20

  • 18_Timer1 : (PIC16F1) Uses the Timer1 module

  • 19_Timer2 : (PIC16F1) Uses the Timer2 module

  • 20_PWM : (PIC16F1) Pulse Width Modulation (PWM) demonstration

  • 21_EUSART : (PIC16F1) Driver for the Enhanced USART module

  • 22_SPI : (PIC16F1) Driver for the Serial Peripheral Interface (SPI)

  • 23_I2C : (PIC16F1) Inter-Intgrated Circuit (I2C) driver

  • 24_I2C1 : (PIC16F1) Additional Driver for Inter-Integrated circuit

  • 25_Shift_Register : (PIC16F1) Driver for 74HC595 shift register

  • 26_Line_Decoder : (PIC16F1) Driver for 74HC138 3-8 line decoder

  • 27_NCO : (PIC16F1) Uses the Numerically Controlled Oscillator (NCO) module

  • 28_Sound : (PIC16F1) Uses an I/O pin to produce a sound

  • 29_Soft_UART : (PIC16F1) Software UART implementation

  • 30_Hall_Effect : (PIC16F1) Driver for the Keyes KY-003 Hall Effect Sensor

  • 31_Touchscreen : (PIC16F1) Diver for interfacing to the NX3224T024_011 Touchscreen module

  • 32_CLC : (PIC16F1) Demonstrates use of the configurable logic cell module

  • I01_DC_Motor : Interfacing to DC Motor

  • I02_Seven_Segment : Interfacing to seven segment module

  • I03_Seve_Segment_Mul : Interfacing to multiplexed seven segment modules

  • I04_Servo_Motor : Interfacing to Servo Motors

  • I05_H-Bridge : Interfacing to SN754410 H-Bridge IC

  • I06_Stepper_Motor : Interfacing to a 4 phase unipolar stepper motor

  • I07_Serial_LCD : Interfacing to a serial LCD

  • I08_Joystick : Interfacing to a joystick

  • I09_TTS : Interfacing to a Emic2 Text to Speech Module

  • I10_RGB_LED : Interfacing to an RGB LED Module

  • I11_IR_Distance_Sensor : Interfacing to a IR Distance Sensor Module

  • I12_Nokia5110 : Interfacing to a Nokia5100 LCD

  • I13_GPS : Interfacing to a NEO-6M GPS module

  • I14_Ultrasonic_Sensor : Interfacing to a HC-SR04 ultrasonic distance sensor

  • I15_SSD1306 : Interfacing to a SSD1306 based LCD

  • I16_GSM : Interfacing to a SIM800L module

  • I17_Bargraph_LED : Interfacing to a bargraph LED module

  • I18_DS1306 : Interfacing to a DS1306 RTC IC

  • I19_Bluetooth_HC05 : Interfacing to a HC05 Bluetooth module

  • I20_DHT11 : Interfacing to a DHT11 temperature and humidity sensor

  • I21_SD_Card : Interfacing to a SD Card and writing a file

  • P01_Termometer : Digital Thermometer project using a LM34 temperature sensor and OLED

  • P02_Temperature_Logger : Temperature logger project using EEPROM for storage

  • P03_IoT_WiFi : IoT Project using ESP8266 ESP-12-F WiFi Module

  • P04_Temp_Fan : Temperature controlled fan project

  • P05_Clock : A touch screen clock using RTC IC and Touch LCD Module

(pic-as) Assembly Libraries and Projects using PIC16F1718 Microcontroller

  • 01_On : Turns an LED on

(LEGACY MPASM) Assembly Libraries and Projects using PIC16F506 Microcontroller

  • A01_Led_On : Turns an LED on
  • A02_Blink : Blinks an LED
  • A03_Modules : Demonstrates using ASM modules
  • A04_Switch : Demonstrates using a switch
  • A05_Timer0 : Uses the Timer0 module
  • A06_Counter : Uses the counter module
  • A07_Sleep : Demonstrates sleep mode
  • A08_WPUC : Uses WPUC
  • A10_Watchdog_Timer : Uses watchdog timer
  • A11_Comparator : Uses comparator module
  • A12_Comparator Wake : Comparator and sleep mode
  • A13_ADC : Uses the internal ADC module
  • A14_Software_PWM : Uses the software PWM module
  • A15_Sound : Generates sound

pic16-projects's People

Contributors

armstrongsubero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar Iván Montiel Cardona avatar Pasci avatar Backwoods Bob avatar Amine NAOUR avatar  avatar  avatar Golam Mostofa avatar  avatar Christwell Zhang avatar  avatar  avatar Patrick Tissot avatar Tobias Johansson avatar  avatar Kobi Cohen-Arazi avatar Nick Camillo avatar Ezz eldeen avatar Alex Toldaiev avatar Oscar Rigoberto Carvajal Ortiz avatar Srikanth T avatar  avatar Vijay Kumar Banerjee avatar repcsi avatar Andres Ramírez avatar 204maker avatar

Watchers

Patrick Tissot avatar James Cloos avatar Christwell Zhang avatar Vincenzo avatar  avatar Andres Ramírez avatar  avatar  avatar  avatar

pic16-projects's Issues

Project 5 the clock

I have bought your book and down loaded the code for the touch screen clock when I open the code in mplabx and try to compile it I get errors I have used xc8 v1.35 v1.38 v1.41 and still get errors can you have a look and see what could be the problem thanks

this is the errors hope you can help

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Glynn/MPLABXProjects/16F/16F1717/New folder/P05_Clock.X'
make -f nbproject/Makefile-default.mk dist/default/production/P05_Clock.X.production.hex
make[2]: Entering directory 'C:/Users/Glynn/MPLABXProjects/16F/16F1717/New folder/P05_Clock.X'
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/16F1717_Internal.p1 16F1717_Internal.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/I2C.p1 I2C.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/Main.p1 Main.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/ds1302.p1 ds1302.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/oled.p1 oled.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/EUSART.p1 EUSART.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/setup.p1 setup.c
"C:\Program Files (x86)\Microchip\xc8\v1.35\bin\xc8.exe" --pass1 --chip=16F1717 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/touchscreen.p1 touchscreen.c
Main.c:105: warning: (346) declaration of "min1" hides outer declaration
Main.c:163: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:187: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:211: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:237: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:257: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:288: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:290: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:297: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:299: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:442: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:445: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
Main.c:448: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
ds1302.c:161: error: (195) expression syntax
(908) exit status = 1
nbproject/Makefile-default.mk:180: recipe for target 'build/default/production/ds1302.p1' failed
oled.c:304: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
oled.c:324: warning: (359) illegal conversion between pointer types
make[2]: *** [build/default/production/ds1302.p1] Error 1
make[2]: *** Waiting for unfinished jobs....
pointer to const unsigned char -> pointer to unsigned char
EUSART.c:110: warning: (346) declaration of "i" hides outer declaration
setup.c:75: warning: (361) function declared implicit int
setup.c:86: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'C:/Users/Glynn/MPLABXProjects/16F/16F1717/New folder/P05_Clock.X'
nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Glynn/MPLABXProjects/16F/16F1717/New folder/P05_Clock.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 3s)

Not all code for the "Programming PIC microcontrollers with XC8"?

Hi,

I was looking for the source code for the above mentioned book and expected it to be in this repo (as this repo is mentioned in the book...).

However (as just one example) chapter 6 has the "P01_CountdownTimer" project. The only "P01" in the repository is "P01_Thermometer".

Where can I find the correct repository?

As a this is a book about coding, I kind of expect to be able to open the source code to make searching easier :).

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.