Skip to content

Instantly share code, notes, and snippets.

View prasant1010's full-sized avatar

Prasant prasant1010

View GitHub Profile
#ifndef F_CPU
# define F_CPU 8000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
#include <avr/pgmspace.h>
#define NUM_DEVICES 8 // Number of cascaded max7219's, or just 1
#define DEL 2800 // Delay for scrolling speed in microseconds
# define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>
#define SegOne 0x01
#define SegTwo 0x02
#define SegThree 0x04
#define SegFour 0x08
int main() {
char seg_code[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
// created by electronify.org
#define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRA = 0xFF; // Configure PORTA as output
while(1)
{
#ifndef F_CPU
# define F_CPU 1000000UL
#endif
#define LCD_DATA PORTB //LCD data port
#define ctrl PORTA
#define en PA7 // enable signal
#define rw PA6 // read/write signal
#define rs PA5//RESET SIGNAL
#include<avr/io.h>
/*
* Created: 12/19/2015 5:44:02 PM
* Author: prasant
website : www.electronify.org
facebook :www.facebook.com/elefy
*/
//transmitter part
#include <avr/io.h>
int main(void)
/*
* one_way_communication_Rx.c
*
* Created: 12/19/2015 6:48:52 PM
* Author: keshab
*/
#define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
#include "lcd.h"
void adc_init()
{
// AREF = AVcc
/****************************************************************************
Title : HD44780U LCD library
Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
File: $Id: lcd.c,v 1.14.2.2 2012/02/12 07:51:00 peter Exp $
Software: AVR-GCC 3.3
Target: any AVR device, memory mapped mode only for AT90S4414/8515/Mega
DESCRIPTION
Basic routines for interfacing a HD44780U-based text lcd display
#include<avr/io.h>
#define F_CPU 8000000UL
#include<util/delay.h>
void glcd_picture(const unsigned char *);
void select_chip(int);
int i;
unsigned char photo[1024]={ 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
/*
* diwali.c
* Created: 9/20/2016 2:56:45 PM
* Author: prasant
* website:www.electronify.org
* questions ? please ask at www.facebook.com/elefy
*
*/
#define F_CPU 1000000UL
#include <avr/io.h>