Skip to content

Instantly share code, notes, and snippets.

View giljr's full-sized avatar
💭
Full Stack Developer with a degree in Computer Engineering.

Gilberto Oliveira Jr giljr

💭
Full Stack Developer with a degree in Computer Engineering.
View GitHub Profile
/* Project: Ardu_Series # 88
* Binary Counter - Logic Analyzer - Building an LED Binary Counter & Improving The Code
*
* INO file: _88_logicCounter_PaulMcWhorter_4bits_02.ino
*
* Date: Dez 2019
*
* Code by: http://www.toptechboy.com/
* Hardware by: Paul McWhorter
*
/* Project: Ardu_Series # 88
* Binary Counter - Logic Analyzer - Building an LED Binary Counter & Improving The Code
*
* INO file: _88_logicCounter_PaulMcWhorter_4bits_01.ino
*
* Date: Dez 2019
*
* Code by: http://www.toptechboy.com/
* Hardware by: Paul McWhorter
*
/* Project: Ardu_Series # 88
* Binary Counter - Logic Analyzer - Building an LED Binary Counter & Improving The Code
*
* INO file: _88_logicCounter_PaulMcWhorter_4bits_00.ino
*
* Date: Dez 2019
*
* Code by: http://www.toptechboy.com/
* Hardware by: Paul McWhorter
*
/*
* Project name:
I2C_Simple (Simple test of I2C library routines)
unit_14_i2c_simple_eco.c
* Copyright:
(c) Mikroelektronika, 2011.
* Revision History:
20191216:
- initial release (J3);
* Description:
/* Project: Unit 10 - 7SEGS
Code: unit_10_2_upDownCounter7segs.c
Objective: This program use interruptions and writes the value of incremented button
on the 7-segment displayCrystal = 8MHz:)
The example program below was compiled on the mikroC compiler (www.mikroe.com)
and aims to write on displays Kit PICGenios Microgens Technology Center.
Note: It does make use of the scanning technique (on-off-on cycle);
all the LEDs stay on for 1ms and we get the impression that
all the LEDs are on at the same time forever;
/* Project: Unit 10 - 7SEGS
Code: unit_10_1_7segsScan.c
Objective: This program use interruption and writes the value 1234 on the 7-segment displayCrystal = 8MHz:)
The example program below was compiled on the mikroC compiler (www.mikroe.com)
and aims to write on displays Kit PICGenios Microgens Technology Center.
Note: It does make use of the scanning technique (on-off-on cycle);
all the LEDs stay on for 1ms and we get the impression that
all the LEDs are on at the same time forever;
This is called Persistence Of Vision - POV :D
/* Project: Unit 10 - 7SEGS
Code: unit_10_0_7segsTest.c
Objective: This program writes the value 1234 on the 7-segment displayCrystal = 8MHz:)
The example program below was compiled on the mikroC compiler (www.mikroe.com)
and aims to write on displays Kit PICGenios Microgens Technology Center.
Note: It does make use of the scanning technique (on-off-on cycle);
all the LEDs stay on for 1ms and we get the impression that
all the LEDs are on at the same time forever;
This is called Persistence Of Vision - POV :D
/* Project: Unit 10 - 7SEGS
Code: unit_10_0_7segsTest.c
Objective: This program writes the value 1234 on the 7-segment displayCrystal = 8MHz:)
The example program below was compiled on the mikroC compiler (www.mikroe.com)
and aims to write on displays Kit PICGenios Microgens Technology Center.
Note: It does make use of the scanning technique (on-off-on cycle);
all the LEDs stay on for 1ms and we get the impression that
all the LEDs are on at the same time forever;
This is called Persistence Of Vision - POV :D
#ifndef _LIB_EEPROM_
#define _LIB_EEPROM_
void EEPROM_Write_byte(unsigned char address, unsigned char dta);
unsigned char EEPROM_Read_byte(unsigned char address);
void EEPROM_Write_int (unsigned char address, unsigned int dta);
unsigned int EEPROM_Read_int (unsigned int address);
void EEPROM_Write_float(unsigned char address,unsigned char *dta);
float EEPROM_Read_float(unsigned char address);
void EEPROM_Write_array (unsigned char address, unsigned char qtd_byte,unsigned char *dta);
void EEPROM_Read_array (unsigned char address, unsigned char qtd_byte,unsigned char *buffer);
#include "lib_eeprom.h"
void EEPROM_Write_byte(unsigned char address, unsigned char dta)
{
char STATUS_GIE = 0;
EEADR = address; // Where EEPROM lives
EEDATA = dta; // Byte to be saved
EECON1.EEPGD = 0; // EEPROM memory pointer
EECON1.CFGS = 0; // EEPROM access control
EECON1.WREN = 1; // EEPROM enable