Skip to content

Instantly share code, notes, and snippets.

❤️
Larissa

Tiago tiagohm

❤️
Larissa
Block or report user

Report or block tiagohm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tiagohm
tiagohm / rda5807.c
Created Aug 3, 2017
RDA5807 - Single-Chip Broadcast FM Radio Tuner
View rda5807.c
/*
RDA5807 - SINGLE-CHIP BROADCAST FM RADIO TUNER
Autor: Tiago Melo
Blog: tiagohm.github.io/microcontrolandos
Compilador: MikroC PRO PIC
*/
#define RDA5807P_ADDRESS 0x20
@tiagohm
tiagohm / projeto_termometro_digital.c
Created Aug 20, 2017
Meu primeiro projeto, feito em 2012: Termômetro Digital
View projeto_termometro_digital.c
//Pinos do LCD
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
@tiagohm
tiagohm / install-jekyll-fedora.sh
Last active Oct 23, 2018
Instalar Jekyll no Fedora 27 / Install Jekyll on Fedora 27
View install-jekyll-fedora.sh
sudo dnf install ruby ruby-devel redhat-rpm-config gcc gcc-c++
sudo gem install json
sudo gem install jekyll bundler
sudo gem update --system
//Na pasta onde se encontra seus arquivos jekyll
bundle install
bundle update
@tiagohm
tiagohm / DS1631.c
Last active May 14, 2020
Termômetro e termostato digital.
View DS1631.c
/*
DS1631 - Termômetro e Termostato.
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO PIC
Bibliotecas: Conversions, C_String, Lcd, Lcd_Constants, Soft_I2C
*/
//Pinos do LCD.
View avr_7_segmentos.c
/*
Demonstração do uso de um display de 7 segmentos com ATMEGA328P.
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO AVR
Bibliotecas:
*/
//Mascara de bits usado para escrever um digito no display
View ellipsis.c
//a memória para os parâmetros será alocada dessa forma: [n][p0][p1][...][pn]
//por isso usamos o endereço de n para obter o endereço dos outros parametros.
unsigned calcular_media(char n, ... ) {
char i;
unsigned res = 0;
for(i = 1; i <= n; i++) {
res += ((char*)&n)[i]; //aponta para o i-esimo parametro e recupera seu valor.
}
return (res / n);
}
@tiagohm
tiagohm / E25xx320.c
Last active May 13, 2020
Memória EEPROM de 32Kb da Microchip.
View E25xx320.c
/*
25XX320 - Memoria EEPROM SPI 32Kb
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO PIC
Bibliotecas: Soft_SPI
*/
// Pinos do 25AA320.
@tiagohm
tiagohm / PCF8591.c
Last active Feb 22, 2018
PCF8591 - 8-bit A/D and D/A Converter
View PCF8591.c
/*
PCF8591 - Conversor Analógico-Digital e Digital-Analógico de 8 bits.
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO PIC
Bibliotecas: Soft_I2C
*/
#define PCF8591_ADDR(addr, rw) (0x90 | (addr << 1) | rw)
@tiagohm
tiagohm / TH02.c
Last active May 15, 2020
Sensor de umidade e temperatura
View TH02.c
/*
TH02 - Sensor de umidade e temperatura.
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO PIC
Bibliotecas: Soft_I2C, Lcd, Lcd_Constants, Conversions, C_String
*/
// Pinos do TH02.
@tiagohm
tiagohm / MCP4725.c
Last active Feb 27, 2018
Conversor Analógico-Digital de 12 bits.
View MCP4725.c
/*
MCP4725 - Conversor Analógico-Digital de 12 bits.
Autor: Tiago Melo
Blog: Microcontrolandos
Compilador: MikroC PRO PIC
Bibliotecas: Soft_I2C, Conersions, C_String
*/
//Pinos do MCP4725.
You can’t perform that action at this time.