Forum Replies Created
-
AuthorPosts
-
Amit Joshi
Participantinterrupts are used when we need to perform a special task during regular task. the full attention of controller is removed from regular task to an important task until this important task is performed.
for example a controller is busy in blinking led on a port0. at Pin 1.0 a buzzer is connected. and a switch is connected to int0 pin. ur task is to on the buzzer when u want. if u use polling u have to monitor P3.2 continuously during led blinking process and this will consume ur 24 clock cycle in each poll. this is not efficient programming . if u use interrupt concept there is no need to monitor the pin P3.2.
example code-
ORG 0000H
LJMP MAIN;
ORG 0003H // int0 isr address
SETB P1.0; // buzzer on when interrupt occur
RETI; // return interrupt
ORG 0030H
MAIN: SETB TCON.0; // int0 an edge trigger interrupt
MOV IE,#81H; // enable harwre interrupt int0
HERE: CPL P0; // led bilinking
ACALL delay;
SJMP HERE;
Delay: // generate a delay subroutine
END
Amit Joshi
Participantu need 26 output lines to connnect 18, 7-segments. i think it can be done with single 40 pin micro
Amit Joshi
Participantthe sensor will provide analog output and u need to convert it into digital. that means u need ADC. this PIC 10F, 12F ,16F series controller have inbuilt adc . u can choose any one one of them.
Amit Joshi
Participantthe internal structure of usart of atmega8535 is quite similar to atmega16 you can prefer the following links:
then if you face any problem post ur query
Amit Joshi
Participantthere are following difference b/w both controller.
1. atmega16 have 16kb flash memory and atmega32 have 32kb
2. atmega16 have 1kb sram and atmega32 have 2kb
3. atmega16 have 512byte eeprom and atmega32 have 1kb
4. In the MCUCR Register, the SM2 and SE bits are swapped, i.e., SM2 is bit 7 and SE is bit 6.
5. the interrupt priority table are quite change.e.g TIMER2 COMP have 4th position in table of atmega16 but it stand at 5th position for atmega32. and INT2 is at 4 position for atmega32.
other peripherals are quite same.
Amit Joshi
Participantthe 8051 was old microcontroller with less complex architecture and less peripheral. avr is advanced, high performace controller. i suggest you to starting with avr. but if you want learn step by step and want to learn different controller u can strat with 8051.
Amit Joshi
ParticipantYour teachers are correct. this type code need different compilers like KeilC for 8051, avr-gcc for AVR microcontrollers.
install that compilers which are available on net. then study the projects written on site step by step. this may help u. if face any problem u can ask.
Amit Joshi
ParticipantIt is an in-built function of avr studio. it automatically set 1000 ms delay according your oscillator
Amit Joshi
Participantif ur working on high frequency external clock the following fuse bit setting can be use for your Atmega16
to enable JTAG =0x89FF
to enable JTAG =0xC9FF
Amit Joshi
Participantthe maximum baud rate of serial communication can be achieve if 16 MHZ crystal are used and UBRR=0
for asyncrohouns (if U2X=0) Fosc/16=1Mbps
(if U2X=1) Fosc/8= 2Mbps
for syncrohouns master mode Fosc/2= 8Mbps
Amit Joshi
ParticipantAs you click on build option the various processes occurs. the compilation and hex file generation are main process. the hex file willbe generated in the same folder where u saved ur project. to burn this hex file into ur controller u hav to use burning device which u have.
1.Insert the controller in the zif socket properly.
2.Next open the corresponding software of burning device.
3.browse the hex file.
4. click on write or burn icon.
if message appear the burn process complete. u can use ur controller in ur circuit.
Amit Joshi
Participantfirst study about the sensor there are various sensor are available like IRbased ,LDR based. than study about motor diver circuit, than control circuit. the control circuit can be designed by logic gate or microcontroller. so follow th step and ask the problem wht u faced.
Amit Joshi
Participantfor wave generation u have to design astable mutlivibrator. it consist R1,R2, and C the value can be detemined by the following formula
F=1/T=1.44/((R1+2*R2)*C)
Amit Joshi
Participantif u r using USBASP programmer, so u have to program it at lower frequency because its fuse bit are configure at 1mhz internal oscillators.
u have short the jumper which make ur programmer to program at lower frequecy. u can set the fuse bit at 0xC9FF to config the controller at external high freq.
Amit Joshi
Participantif u r using USBASP programmer, so u have to program it at lower frequency because its fuse bit are configure at 1mhz internal oscillators.
u have short the jumper which make ur programmer to program at lower frequecy. u can set the fuse bit at 0xC9FF to config the controller at external high freq.
-
AuthorPosts