Hi,
i would like to reuse library for 1602 display in non-arduino project.
My first question is what are those hex values written after defining function in library file .h?
So far i need only to change lines which are using command from Arduino.h library am i right?
Its better to use already writed library but this is just for learning purpose.
#define Places an identifier instead of the binary command... ie.. Send 0x1 to the display and it clears the display and sets the cursor to home.
Then instead of remembering the code in binary.
LCD_COMMAND(0x01);
you can use English ( or whatever you like )
LCD_COMMAND(LCD_CLEARDISPLAY); make it more readable..
#define Places an identifier instead of the binary command... ie.. Send 0x1 to the display and it clears the display and sets the cursor to home.
Then instead of remembering the code in binary.
LCD_COMMAND(0x01);
you can use English ( or whatever you like )
LCD_COMMAND(LCD_CLEARDISPLAY); make it more readable..
I just want to assign mcu pins to lcd pins. Is better to setup port in main.c or in added library?
I though that this library has as default assigned pins on port D and i can redefin them.
What undefined reference means?
I included "HD44780.h" which cointains these functions.
Its MIT licence so i gues i can upload it here. I have these files in my project folder. Even Atmel studio itself shows help when writing these functions.
#include "HD44780.H" implies that the header and C file are in the same directory as your "main" C file..
Also make sure HD44780.C is in the build.. I'm not familiar with your IDE so I need to understand what the linker is doing... BUT!! this error is weird, because if the header cant be found, a different error would occur.
I believe its avr-gcc becouse of build output
....Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe.....
invoking: AVR/GNU C Compiler : 5.4.0
This is weird. On new project i added util/delay.h library and it says F_CPU is not defined. With added #define in main.c it says its redefined
I dont think its supposed to edit cpu frequency in delay.h.
location of previous definition:
Is this just for calculations?
Ok i think i know why its not working. The reason is becouse its not working.
Atmel STUDIO is dead. It disapears from internet. You cant download it anymore (i mean officialy, but there are old version still avaible in microchip archives). On one forum i found it stops working with one W10 update and they just close it.
nice...
What i should use for AVR then? Visual studio code and link compiler?