Skip to content

Instantly share code, notes, and snippets.

View BETHEBLUES's full-sized avatar

Bongsu BETHEBLUES

View GitHub Profile
@BETHEBLUES
BETHEBLUES / Input Capture example.c
Created December 18, 2014 12:15
PIC Input Capture Example PIC24JF256GB206
// ReadMe ---------------
// Chipset PIC24FJ256GB206
// IDE : MPLAB X IDE 2.26
// Compiler : XC16 1.23
// TIMER_1_FREQ
// LEEBS 2014_1215 : check
void Initial_Timer1(void)
{
@BETHEBLUES
BETHEBLUES / UART_RX_TX_parsing.c
Created December 18, 2014 12:03
UART_RX_TX example for PIC24FJ256GB206
// ReadMe ---------------
// Chipset PIC24FJ256GB206
// IDE : MPLAB X IDE 2.26
// Compiler : XC16 1.23
//----------board.c-----------
#define USE_AND_OR /* To enable AND_OR mask setting */
#include "include/gpio.h"
@BETHEBLUES
BETHEBLUES / UART TX string example.c
Created December 17, 2014 09:19
UART TX string example
// ReadMe ---------------
// Chipset PIC24FJ256GB206
// IDE : MPLAB X IDE 2.26
// Compiler : XC16 1.23
#define USE_AND_OR /* To enable AND_OR mask setting */
#include "include/gpio.h"
@BETHEBLUES
BETHEBLUES / PIC24FJ series UART1 example.c
Created December 16, 2014 11:41
PIC24FJ series UART1 example
#define USE_AND_OR /* To enable AND_OR mask setting */
#include "include/gpio.h"
#include "include/board.h"
#include <PIC24F_periph_features.h> // from XC16 comfiler : LEEBS 2014_1209
#include <PIC24F_plib.h> // from XC16 comfiler : LEEBS 2014_1209
void Initial_UART_1(void)
@BETHEBLUES
BETHEBLUES / i2c_master.c
Created December 13, 2014 13:31
Arduino I2C master _ sensor read
// I2C SRF10 or SRF08 Devantech Ultrasonic Ranger Finder
// by Nicholas Zambetti <http://www.zambetti.com>
// and James Tichenor <http://www.jamestichenor.net>
// Demonstrates use of the Wire library reading data from the
// Devantech Utrasonic Rangers SFR08 and SFR10
// Created 29 April 2006
// This example code is in the public domain.
@BETHEBLUES
BETHEBLUES / header.h
Created December 8, 2014 11:05
header file redefine check
#ifndef _MY_HEADER_H_
#define _MY_HEADER_H_
// add code for myheader.h
// ...
#endif // #ifndef _MY_HEADER_H_
@BETHEBLUES
BETHEBLUES / String_capital_letter.c
Created December 7, 2014 12:21
Change to Capital letter
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
size_t mySize1, mySize2;
int i;
char myString[] = {"Bongsu_Hello"};
char myName1[] ={"Bongsu"};
@BETHEBLUES
BETHEBLUES / double_array_sample.c
Created December 7, 2014 12:19
Double Array Sample
int sum(int (*p)[4]);
int _tmain(int argc, _TCHAR* argv[])
{
int value;
int test[3][4]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
value = sum( test );
printf("%d", value);
return 0;