Category : avr

I have been learning the make program. I wanna to program LCD by the AtMega8 and compile it with the Makefile. I wrote this basic code: #ifndef __AVR_ATmega8__ #define __AVR_ATmega8__ #endif #define F_CPU 8000000UL #include <avr/io.h> #include <util/delay.h> #include "hd44780.h" int main(void) { lcd_init(); lcd_clrscr(); lcd_puts("Hello World"); while (1); return 0; } And I wrote ..

Read more

I wrote a c++ code in avr version 4.14 for atmega328p #include <avr/io.h> #include <util/delay.h> int main(){ DDRB |= (1<<0x01); while(1) { PORTB |= (1<<0x01); _delay_ms(500); PORTB &= ~(1<<0x01); _delay_ms(500); } return 0; } It gives me that error that I don’t understand: ../test.c:21: fatal error: opening dependency file dep/test.o.d: No such file or directory ..

Read more

Development Environment Controller: Atmega8 Language: C++ (-std=gnu++14 flag added ) IDE: atmel studio 7 Note: Most of the std:: libraries like ostream ,string ,cout, are not available with this minimal c++ support. almost similar functionality has been implemented ,but the function call is different printf1(<object>, … ); printf1(Lcd4bit2,"Val:",x,’=’,5,"+",3.4); I would like to change the code ..

Read more

I’ve just started programming my AtMega8 with using V-USB link: https://www.obdev.at/products/vusb/index.html. I’m trying to make a keyboard witch will be pushing CTRL+ALT. To do this I modified one of the project "HID Keys" link: https://www.obdev.at/products/vusb/hidkeys.html. I added and modified: //line 150, added definitions #define KEY_DELETE 42 #define ALT_RIG 230 #define ALT_LEF 226 #define CTRL_LEF 224 ..

Read more