Forum Replies Created
-
AuthorPosts
-
srinuParticipant
which version ur using……????
srinuParticipantuse ultra sonic sensor
or DISTANCE SENSOR or IR SENSOR
srinuParticipanthi
may b it helpful for u……………….
ir DIGITAL OUTPUT CKT…..
njoy ur circuit….
srinuParticipantok…
seee here
PORTD|= (1<<PD0);
_delay_ms(1000);
PORTD| = (0<<PD0);
ur dng OR operation, means applying LOGICAL OR.
that mean dng 1 ORING with 0….
again the result also 1.
that is the reason….
and one more suggetn is give delay after clearing PD0
means
PORTD|= (1<<PD0);
_delay_ms(1000);
PORTD| = (0<<PD0);
_delay_ms(1000);
k?
srinuParticipantuse atmega644pa
srinuParticipanti think u know the truth table of AND & OR logic
the same opperaton is going on here..
in first two statements..
PORTD |= (1<<PD0 ) and PORTD = (1<<PD0) both opperations are same
but in second statemnt(PORTD = (1<<PD0)), we r dng PD0 as a ONE and remaing all pins are ZERO.
in first statemnt (PORTD |= (1<<PD0)), only PD0 as ONE and we r not touching remng PINS..that mean
if PD1=1,
in first statemnt PDO=1 and PD1 also 1
but in second PD0 =1 and PD1 is ZERO.
and remaing also same…..
i hope u undersd…………
srinuParticipanthi….udgisham give u one adc code..but it is in atmega8.in this project am sending AADC values to UART…..i hope u undstd this code………#define F_CPU 8000000UL#include<avr/io.h>#include<util/delay.h>#include “lcd.h”/*********************************************************************** adc init *******************************************************************/void InitADC(){ADMUX=(1<<REFS0);ADCSRA=(1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);}/**************************************************** READING ADC BITS ***************************************************/uint16_t ReadADC(uint8_t ch){ch=ch&0b00000111;ADMUX =ch | (1<<REFS0);ADCSRA|=(1<<ADSC);while(!(ADCSRA & (1<<ADIF)));ADCSRA|=(1<<ADIF);return(ADC);}/********************************************************* UART***********************************************************************************************/void uart_init(){// SETTING BIT PARITY (8BIT OR 9 BIT)UCSRC=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); //8 BIT//FOR TX AND RXUCSRB=(1<<RXEN)|(1<<TXEN);// ENABLING TX,RX.UBRRL=0x33; // baud rate(51 for 9600)}void tx_data(unsigned char c){//SENDING DATA;UDR=c;while(!(UCSRA & (1<<TXC))); //set the TX flag//clear the TX flagUCSRA=(1<<TXC);}unsigned char rx_data(){// Wait for data to be receivedwhile ( !(UCSRA & (1<<RXC)) ); // set the rx flagUCSRA=(0<<RXC);// CLEAR THE rx flag/* Get and return received data from buffer */return UDR;}void Tx_String(unsigned char *str){while(*str){tx_data(*str);str++;}}/*********************************************************MAIN PROGRAM ** ** ** ** ** ** ** ** ** ** *********************************************************/void main(){int adc_result0;uart_init();InitADC();InitLCD(LS_BLINK|LS_ULINE);LCDWriteStringXY(0,0,”adc_test”);while(1){_delay_ms(1000);ReadADC(0);adc_result0=ReadADC(0);LCDWriteIntXY(0,1,adc_result0,4);tx_data(adc_result0);}}srinuParticipantwhich motor is u r using..
srinuParticipantu no need data sheet for GPS…
it gives LATTITUDE AND LANGITUDE Positions
but that position values will get in sertain formait…i.e
$GPRMC:
in this, u will get LAT AND LANG POsition values
so u just separet this values and use it…
GPS cost range strat from 1k.
srinuParticipanthey instd of ponyprog bettre to switch ur burner for PROGISP
it is easy and burns fast……………..
November 9, 2011 at 12:38 pm in reply to: interfacing RF wireless modules to ATMEGA16 microcontroller #6824srinuParticipanthi krishnaa………….
here am suggest one link whch helpful to u….. in every time
srinuParticipantGSM works based on AT command
1st u download the at commands and use it..
most of GSM works based on UART communication…..
so u connect ur gsm to ur controller thriugh rs232 and MAX232…….
when u get sms to ur GSm it gives the command as AT++CMTI: “SM”,1
thriugh this command u can decode ur message…
and one more imp thing is if ur sim message is full it will not show ur message……
first u delt ur sim message and try this……………………………
hope u undrstnd
November 8, 2011 at 1:05 pm in reply to: How to make the receiver of universal remote control to turn on and off a relay #6817srinuParticipanthi usman………………
what our friends told thats may right…..
but if u just want only on r off the relay u have to use combination of IR reciever variable resisitr nad TRANSISTOR
srinuParticipantu can also use laser as transmitting data as well as voice data…..
but it need encoder and decoder circuit and IC complsry……………..
srinuParticipantif u want check the IR TRANSMITTER, u can use Any normal camera like mobile camera…
-
AuthorPosts