23. Arduino for Production! AVR Atmega32 - Separating Reusable Code to Form a Library

preview_player
Показать описание
Purchase my new book: Arm Microcontroller Programming and Circuit Building Volume 1

Please watch: "Buildyourcnc CNC Router on Love Yurts"
Patrick's Tip Jar:
bitcoin:1Gtawd29Sgu5CdvfUnkRg1YBfowCawjFdH
Ether:0xa962365100011B79097A7bb9DD51A53eE98266bb
If you have found this video to be helpful, consider making a tip. Thanks.
Official Page with More Information:

In this video, I demonstrate the process to separate code that was created in the main file to be stored in library files. The example I use to do this is the code created to control and display characters on an LCD.

Equipment that I use to make videos:

Рекомендации по теме
Комментарии
Автор

I will reiterate what nebe01 said. Your tutorial videos on AVR are fantastic. Even if I wasn't an EE student, I think that I would be able to understand your videos.

Thank you very much. Keep up the fantastic work.

darrellrread
Автор

Just getting started with Arduino ... LIke your series of information.  

Right now watching "Microcontrollers - AVR Atmega32 - Separating Reusable Code to Form a Library" and ... OMFG someone who in simple terms explains the seperating code out into header files.

Keep up the good work!

Anonymous-tojj
Автор

I have followed along with all the videos and my LCD screen is working great, Your videos is definitely one of the best resources out there for learning to program AVR chips, thanks.

I have a bag with 7 Microchip MCP23017 16-Bit I/O Expander ICs in my desk. I have programmed them before using an Arduino. They are quite inexpensive and could work great to create an LCD that can be controlled with Two Wire/I2C interface freeing up 9 pins on the AVR MCU.

I haven't programmed I2C/Two Wire in C before, and I assume it is not as simple as using the Wire Library in Arduino.

I will see if there are any good info at AVR Freaks, Google and of course the Atmel datasheets.

But now that I understand how a LCD works I am going to attempt and modify this library to work with a MCP23017.

If I could make a suggestion for future videos, it would be great if you could make a video series on using I2C/Two Wire and maybe even SPI.

Do you cover some of these topics on your DVD perhaps?

Thanks for the time and effort you put into these videos it is greatly appreciated.

nebe
Автор

Great! please create tutorial series on PIC microcontrollers as well as they are popular like AVR.

hobbyelectronics
Автор

@bagatelox I use the mouse clicking because: I am clicking on the tabs at the top of the programming section and it's difficult to determine when I click on a tab to change the file that I am working with. Some folks out there may find this helpful. I would like to hear from others if this is an annoyance or a benefit.

PatrickHoodDaniel
Автор

@fii7e Yes, I will be doing servos (standard and digital) very soon.

PatrickHoodDaniel
Автор

@amtpdb1 Thanks for the feedback. I think I will be keeping it as it is more helpful than a disturbance, but I will check to see if there is a way to change the click sound for a more soothing option. :)

PatrickHoodDaniel
Автор

@bagatelox I will be including PIC and ARM and the code will be placed in the same pages as the AVR so folks can see the alternatives in one place. I can't tell you when I will be doing this, however.

PatrickHoodDaniel
Автор

@axel1973w I will do some test on using cpp code and better abstraction. That sounds like a good set of tutorials.

PatrickHoodDaniel
Автор

Your Video-Tutorials are really helpful, thank you!
Could you do something with Servo-motors in one of your next episodes?

fiie
Автор

I prefer the click myself.
Thanks
Don

amtpdb
Автор

@axel1973w Yes, abstraction is nice. I will try testing it. Thanks.

PatrickHoodDaniel
Автор

If you made it, can you please direct me to the video in which you constructed the make file?
Thank you 

mp
Автор

@jesterjunk Thanks. I will probably stop using the yellow circle since the videos are zoomed in most of the time.

PatrickHoodDaniel
Автор

m working on ATMega8.... which port and pins do u suggest for data and control lines;
while taking into consideration that:
1. PDO and PD1 i.e., RX & TX are connected for wireless transfer (transfer and lcd both are working simultaneously).
2. PC6 used for reset.
3. PB6 & PB7 are used for crystal.

SuryanshJain
Автор

The clicking doesn't bother me as much as that giant yellow circle around the cursor, I find that very distracting.

jesterjunk
Автор

Hi Patrick Hood
can you help me
how I can sperate code and creat .h file in AVR STUDIO 6

LIEDAM
Автор

@anajonesr It might not be so bad if it were half the size.

jesterjunk
Автор

why do we need to seperate .h file and .c file....can we just paste all c functions into .h file?

saifulkoh
Автор

> "make.exe" all
make.exe: *** No rule to make target `all'. Stop.

> Process Exit Code: 2
> Time Taken: 00:00 this drives me crazy and i have no idea wtf this winavr should be good for do u know whats going wrong here?

fisktomte
visit shbcf.ru