Search found 22 matches
- 04 Feb 2013 19:03
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
Re: atmega32 timer1 init()
Dear sir i have been success using timer1 in ctc mode void timer1_init() { // TCCR1A=0; TCNT1H = 0; TCNT1L=0; OCR1AH = 0xDC; //****first wright high byte OCR1AL=0x05; //*** then write low byte TIMSK |= (1 << OCIE1A); SREG_I_bit = 1; TCCR1B |= (1<<WGM12)|(1 << CS12)|(1 << CS10); } it works . rgds aja...
- 31 Jan 2013 16:56
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
Re: atmega32 timer1 init()
hi
can you send me any example of timer1 used in ctc mode.
rgds
ajay
can you send me any example of timer1 used in ctc mode.
rgds
ajay
- 30 Jan 2013 18:20
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
Re: atmega32 timer1 init()
hi unable to understand after too much searching i didn't get any solution, pls see my code void timer1_init() { // TCCR1A=0; TCNT1L = 0; TCNT1H=0; OCR1AL = 0xDC; OCR1AH=0x05; //SREG_I_bit = 1; TIMSK |= (1 << OCIE1A); SREG_I_bit = 1; TCCR1B |= (1<<WGM12)|(1 << CS12)|(1 << CS10); // UART1_Write_Text(...
- 05 Nov 2012 13:04
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
Re: atmega32 timer1 init()
Problem is that i can write my code only when the compiler knows the resistor TCNT1 and OCR1A,it showing an error TCNT1 and OCR1A not defined,same code works in avr studio,how do i access these resistor in mikroc pro for avr.
Rgds
ajay
Rgds
ajay
- 04 Nov 2012 13:34
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
Re: atmega32 timer1 init()
dear sir
i didn't get any help with example b'coz their is no example which use output compare resister OCR1A,can you pls tell me how we can access TCNT1 and OCR1A resisters manually.
rgds
ajay
i didn't get any help with example b'coz their is no example which use output compare resister OCR1A,can you pls tell me how we can access TCNT1 and OCR1A resisters manually.
rgds
ajay
- 23 Oct 2012 05:10
- Forum: mikroC PRO for AVR General
- Topic: atmega32 timer1 init()
- Replies: 9
- Views: 4862
atmega32 timer1 init()
dear sir
how can i initialise timer1 in atmega32
void timer1_init()
{
TCCR1B |= (1 << WGM12) | (1 << CS10);
TCNT1 = 0;
OCR1A = 1500;
TIMSK |= (1 << OCIE1A);
}
when i compile this it showing an error TCNT1 and OCR1A not defined.
pls help.
rgds
ajay
how can i initialise timer1 in atmega32
void timer1_init()
{
TCCR1B |= (1 << WGM12) | (1 << CS10);
TCNT1 = 0;
OCR1A = 1500;
TIMSK |= (1 << OCIE1A);
}
when i compile this it showing an error TCNT1 and OCR1A not defined.
pls help.
rgds
ajay
- 07 Aug 2012 16:20
- Forum: mikroC PRO for AVR General
- Topic: how to add our source and header file
- Replies: 6
- Views: 8434
Re: how to add our source and header file
sorry for the last post,problem has been solved when i have started with new project and add source file as you have stated above,everything working fine.
thanks/rgds
ajay
thanks/rgds
ajay
- 06 Aug 2012 17:04
- Forum: mikroC PRO for AVR General
- Topic: how to add our source and header file
- Replies: 6
- Views: 8434
Re: how to add our source and header file
pls note my code below main.c //#include"nokia.h" #include<nokia.h> int main(void) { nokia_init(); } //nokia.c void nokia_init() { SPIDDR=(1<<SDA)|(1<<CLK)|(1<<CS)|(1<<RESET); //Port-Direction Setup CS0 SDA0 CLK1 . senddata1(0x00); sendCMD(0x00); . . } //nokia.h #define byte unsigned char extern voi...
- 06 Aug 2012 07:08
- Forum: mikroC PRO for AVR General
- Topic: how to add our source and header file
- Replies: 6
- Views: 8434
how to add our source and header file
dear sir
i m working with mikroc pro for avr i have made my own source file nokia.c and its header file nokia.h with consist my own function,i want to use it in the main.c file,pls advise how can i add these file in my main source file.
Rgds
ajay
i m working with mikroc pro for avr i have made my own source file nokia.c and its header file nokia.h with consist my own function,i want to use it in the main.c file,pls advise how can i add these file in my main source file.
Rgds
ajay
- 18 Jul 2012 05:23
- Forum: mikroC PRO for AVR General
- Topic: tft proto board not working
- Replies: 6
- Views: 2811
Re: tft proto board not working
i m getting nothing after adding this function also,i think my display has damage,can u advise me how can i check my display that it is ok or damage.
Rgds
ajay
Rgds
ajay
- 16 Jul 2012 16:44
- Forum: mikroC PRO for AVR General
- Topic: tft proto board not working
- Replies: 6
- Views: 2811
Re: tft proto board not working
dear sir
i m using atmega32A which is 3.3v mcu.
Rgds
ajay
i m using atmega32A which is 3.3v mcu.
Rgds
ajay
- 16 Jul 2012 16:39
- Forum: mikroC PRO for AVR General
- Topic: tft proto board not working
- Replies: 6
- Views: 2811
Re: tft proto board not working
dear sir
i m using tft proto board from mikroelectronica also i m using 3.3v mcu.
Rgds
ajay
i m using tft proto board from mikroelectronica also i m using 3.3v mcu.
Rgds
ajay
- 15 Jul 2012 19:02
- Forum: mikroC PRO for AVR General
- Topic: tft proto board not working
- Replies: 6
- Views: 2811
tft proto board not working
dear sir i have bought tft proto board and connect it as given in help file in mikroc for avr db10-db17 ---------- data port cs through 10 k resistor to control pin portb rd pin portb rs pin portb wr pin portb rst throught 10 k resistor to portb LEDK to ground and LEDA through 1k resistor to 5v rest...
- 10 May 2012 08:18
- Forum: mikroC PRO for AVR General
- Topic: regd stm32 compiler
- Replies: 3
- Views: 1936
Re: regd stm32 compiler
one more thing i want to know that stellaris arm development board will support stm32 or we have to puchase some other stm32 board.
Rgds
ajay
Rgds
ajay
- 08 May 2012 05:01
- Forum: mikroC PRO for AVR General
- Topic: regd stm32 compiler
- Replies: 3
- Views: 1936
regd stm32 compiler
Dear sir
Pls tell me when this compiler has been released also this compiler can support both stellaris and stm32 or we have to purchase stellaris compiler separately.
rgds
ajay singh
Pls tell me when this compiler has been released also this compiler can support both stellaris and stm32 or we have to purchase stellaris compiler separately.
rgds
ajay singh