Archive

Archive for February, 2010

AVR Half Duplex Software UART (9600 bps, 8N1)

February 23rd, 2010 nashrul 1 comment


/*********************************************
This program was produced using
CodeVision AVR V1.23.6b Standard
© Copyright 1998-2002 HP InfoTech s.r.l.

http://www.hpinfotech.ro

e-mail:office@hpinfotech.ro , hpinfotech@xnet.ro

Project : UART3: Half Duplex Software UART (9600 bps, 8N1)
Version : 1.3
Date : October 2002
Author : Radu Hristea (radu.hristea@aptrans-group.com; transeast@programmer.net)
Company : TransEast s.r.l.
Comments: Total size = 321 words (including the demo program)
The receive line is buffered (the user can modify the buffer size).
The receive routine detects and rejects the frame errors.

Chip type : ATmega128
Program type : Application
Clock frequency : 4.000000 MHz
Memory model : Small
Internal SRAM size : 4096
External SRAM size : 0
Data Stack size : 1024
*********************************************/
#include
#include "defs.h "
// UART3 Global Registers
byte u3_buffer ; // serial buffer
byte u3_bit_nbr; // bit counter
byte u3_status ; // status register
// UART3 Receiver buffer
byte rx_buffer3[RX_BUFFER_SIZE3];
byte rx_wr_index3, rx_rd_index3, rx_counter3;
// This flag is set on UART3 Receiver buffer overflow
bit rx_buffer_overflow3;

Read more...

AVR SHT 11 (Temperature & Humidity Sensor)

February 19th, 2010 nashrul 5 comments

/***************************************************************************

File : sht-11.c

Description : Main module

Project : SHT 11 Temperature & Humidity Sensor

Version : 2.0.1

Author : nashrul@nashrul.co.cc

Date : 2010

***************************************************************************/

#include

#include

#include

#include

#asm

.equ __lcd_port=0×15 ;PORTC

#endasm

#define io DDRB.1

#define sda_out PORTB.1

#define sda_in PINB.1

#define sck PORTB.0

#define temp 0b00000011

#define humi 0b00000101

#define read_reg 0b00000111

#define write_reg 0b00000110

union data_int{unsigned char c[sizeof unsigned int];unsigned int t;}sht;

unsigned char lcd[20],msbt,lsbt,msbh,lsbh,value;

unsigned int temperatur,humidity;

Read more…

Brisingr

February 15th, 2010 nashrul 1 comment

Eragon dan naganya, Saphira, berhasil bertahan hidup setelah pertempuran kolosal melawan para prajurit Kekaisaran di Dataran Membara. Namun masih banyak yang harus dihadapi sang Penunggang dan naganya ini.

Read more…

Eldest

February 14th, 2010 nashrul 1 comment

Kegelapan turun…

Pedang-pedang beradu…

Kejahatan menang.

Read more…

Eragon

February 13th, 2010 nashrul 1 comment

When Eragon finds a polished blue stone in the forest, he thinks it is the lucky discovery of a poor farm boy; perhaps it will buy his family meat for the winter.

Read more…

Switch to our mobile site