Тёмный

Learning AVR-C Episode 10: Serial Communication (TX) 

humanHardDrive
Подписаться 48 тыс.
Просмотров 117 тыс.
50% 1

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 76   
@EalhamAlMusabbir
@EalhamAlMusabbir 6 лет назад
I have been desperately searching for such tutorial for my project but I wonder why I couldn't find your video. All I got were rubbish... Your video deserves more viewers. Thank you so much for your effort.
@brunooliveirasoares7489
@brunooliveirasoares7489 4 года назад
I don't know if you keep going with this channel, but THANK YOU! It's clear and well explained!
@humanHardDrive
@humanHardDrive 10 лет назад
Re-uploaded, and everything looks good.
@vidbay119
@vidbay119 4 года назад
Hy i tried your code on my project ... and im getting sum unknown characters (like this -- "ÿ wïô¬ýÍtî«ÿLïù›ò·ï{w[÷ŽùÙÕ­›{wß
@vidbay119
@vidbay119 4 года назад
And Thanks for the code :D
@cbttrainer
@cbttrainer 5 лет назад
Brilliant work. I've seen code that sets it up, but nothing that explained like you did. Thanks. Very helpful!
@johnbattaglia6369
@johnbattaglia6369 6 лет назад
Hey dude, really great tutorial. I feel learning how to read the datasheet is exactly what I need to learn to do better.
@adenvalentin7838
@adenvalentin7838 3 года назад
I dont mean to be off topic but does anybody know a trick to get back into an instagram account? I somehow forgot the password. I appreciate any help you can offer me
@ridgeahmed3088
@ridgeahmed3088 3 года назад
@Aden Valentin Instablaster :)
@adenvalentin7838
@adenvalentin7838 3 года назад
@Ridge Ahmed thanks for your reply. I got to the site through google and I'm waiting for the hacking stuff now. Seems to take quite some time so I will get back to you later when my account password hopefully is recovered.
@adenvalentin7838
@adenvalentin7838 3 года назад
@Ridge Ahmed it did the trick and I finally got access to my account again. I'm so happy! Thanks so much, you saved my account :D
@ridgeahmed3088
@ridgeahmed3088 3 года назад
@Aden Valentin no problem :D
@Frisky0563
@Frisky0563 10 лет назад
Nice work! Can you do a lcd tutorial using 4bit mode? Thanks
@deddicarles1725
@deddicarles1725 3 года назад
Weww! it's really detail explanations! Thanks!
@GfastGao
@GfastGao 10 лет назад
Master Piece!I hope you can go on do the perfect job!
@videolan
@videolan 10 лет назад
Many thanks - this episode works fine now!
@MrMitdac01
@MrMitdac01 6 лет назад
Thank you so much , very good education videos :D
@PentaxSource
@PentaxSource 7 лет назад
This is great stuff!
@bhathiyabandara4390
@bhathiyabandara4390 6 лет назад
Thank you very much.. Code nicely works...
@aquacode2
@aquacode2 6 лет назад
Mr HardDrive! I have been following your videos well until this one. We need UART for a project, and I am currently using the ATmega324PB, which is very similar to the 328P. However I can't transmit an 8 to PUTTY or Tera Term. Whereas you write "TXEN0" I can only write "TXEN" to keep the term purple. If I try to write numbers after TXEN I get errors. I am unsure of how to solve this issue.
@nazatkabir3442
@nazatkabir3442 7 лет назад
brc is baud rate converter
@siddharthmali5841
@siddharthmali5841 3 года назад
Great. Thank you.
@andread81yt
@andread81yt 10 лет назад
Very nice!
@jesusreignonhigh6732
@jesusreignonhigh6732 3 года назад
I was thinking of having two Atmega 328p. One for controlling a display and getting user inputs and the other that will take in the user input and processing it. Is UART possble to be used for this purpose?
@Alymissy
@Alymissy Год назад
the website for the code doesn't work anymore but good guide
@DavidChipman
@DavidChipman 10 лет назад
As far as the warning about strlen() goes, you forgot the header file, that is why it's complaining. Please consider fixing this.
@quisyNeals
@quisyNeals 7 лет назад
If I were trying to use two "rf" tranceivers to allow two microcontrollers to communicate with eachother (wirelessly), would the frequency of the mirocontrollers have to match the frequency of of the tranceivers. If so, how exactly would I go about that (like, step by step).
@abrahamsibusiso6791
@abrahamsibusiso6791 6 лет назад
what is the possible reason for successful serial communication, assigning different baud rate between the atmega F_CPU 8Mhz 4800 and the tera term(9600),
@ashwin372
@ashwin372 3 года назад
really appreciate these video series. The link is not working though :( please take a look
@aqualung2000
@aqualung2000 2 года назад
Good video, with some really helpful tips. But your ring buffer is highly problematic. Adding a byte to the ring buffer and then incrementing your "write" counter are not atomic operations....an interrupt could well occur in-between those two things and then your interrupt handler would not behave correctly (it might think the read & write indexes were the same!) At the very least, I think you should disable interrupts while updating the ring buffer. Also, requiring the code to transmit a zero (to "prime the pump") isn't really a general solution to the problem. Not all applications will be able to handle an arbitrary 0 being sent into the bit stream! That all should be redesigned.
@tradegrabber4854
@tradegrabber4854 5 месяцев назад
17:33 mistake in the code, it should be: serialReadPos = 0; But anyway, thanks for great lessons!
@raysovilj
@raysovilj 4 года назад
Any ideas why it does not work for higher baud rates?
@pankraftak1641
@pankraftak1641 8 лет назад
Hello :) I have a little problem with this. I have (also) Atmega328P (16MHz external crystal WITHOUT internal 8 divide) (The fuse bits are: low:0xFF, high:0xD6 extended:0x05) so the freq. is really 16MHz and as serial to USB "convertor" I use Arduino uno board (without chip in it) because Arduino behaves like USB to UART (without chip) convertor. But it doesnt work...there is nothing on serial monitor. Could you help please? Thanks :) PS.: This tutorial is nice )
@_Iokanaan_Marusidze_
@_Iokanaan_Marusidze_ 2 года назад
thanks !
@TheEsat66
@TheEsat66 6 лет назад
How to do this for 115200, just changing the baudrate in the code does not work...
@mosleyau
@mosleyau 7 лет назад
I'm trYing to transmit from atemga168 to the DFPayer Mini to play mp3 songs when I push. button. How can I communicate with TX? Please help. thank you
@YashPatil26
@YashPatil26 5 лет назад
Hello, I tried implementing your code on my Arduino Mega. It works fine as long as I am sending single character but the string method won't work. It just keeps sending blank character. Help Please!
@psyonik1
@psyonik1 6 лет назад
Tried your code verbatim with the SMD of that chip and it doesn't work at all. Any ideas?
@JAGANNATHSAHOOtheraw
@JAGANNATHSAHOOtheraw 7 лет назад
Micrcontroller sening null charactor always when i dont want to transmit.....can you fix it??? And i need some help in fixing with esp8266
@rubensalves3899
@rubensalves3899 6 лет назад
very good, congratulation
@maheshgaur143
@maheshgaur143 8 лет назад
hi...can we see the data that we are sending on I/O while debugging ..or data on to the scope while running the program on uc
@Olavotemrazaodenovo
@Olavotemrazaodenovo 5 лет назад
Excellent
@aliemad9455
@aliemad9455 3 года назад
thank you ❤❤❤
@klemenapk
@klemenapk 7 лет назад
Maybe a stupid question. I tried this manytimes and always failed on my own. Then in your video i noticed that you add apostrophy sign ( ' ) on each side of number 8. After i did the same thing, all my old code started to wor kand display messages as it should. I know that " is used for string, but why is ' neccessary? Thanks
@EalhamAlMusabbir
@EalhamAlMusabbir 6 лет назад
String and Character are not same... To send string, we use double quotation ("example string") ... For character type data, we use single quotation ( 'A' ) . Thats how C-language defined those data types.
@demetriusdemarcusbartholom8063
ECE 312, UofA.
@luimarcilui
@luimarcilui 9 лет назад
Hello, How can i print out a char. For example char a='a'; serialprint(WHAT SHOULD I PUT HERE.)
@havocdev
@havocdev 9 лет назад
You would put test in this example char test='b' ; serialprint(test);
@kinghenry238
@kinghenry238 6 лет назад
Where do you get that USB cable ?
@Joutubbb
@Joutubbb 8 лет назад
Does it work with a DFU bootloader ?
@70da24
@70da24 6 лет назад
does it works on atmega16a ?
@francecop9454
@francecop9454 8 лет назад
Hello - I have set F_CPU to 1000000 and CKDIV8 fuse is enabled. I get a different character? Could you please tell me what am I doing wrong?
@francecop9454
@francecop9454 8 лет назад
+France Čop Got it - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.
@onurolce7389
@onurolce7389 10 лет назад
Thanks :)
@xelionizer
@xelionizer 7 лет назад
LOLCAT, you wrote "BUAD"...XD
@ukaszOstapiuk
@ukaszOstapiuk 10 лет назад
add this to playlist
@Arivien
@Arivien 10 лет назад
this code did not work for the 328. It compiled successfully, but the screen was blank. What should I do if I am not using a crystal oscillator?
@larinlamoreaux
@larinlamoreaux 10 лет назад
In the video he uses a crystal oscillator of 16MHZ so he set his F_CPU 16000000. If you are not using an external oscillator the internal default is 8Mhz. So set F_CPU 8000000 and make sure the CKDIV8 fuse is not enabled, or try setting your F_CPU to 1000000. One of those options should work. Look at the Atmega328 datasheet 8.2.1
@francecop9454
@francecop9454 8 лет назад
Hello - a have set F_CPU to 1000000 and CKDIV8 fuse is enabled. I get a different character? Could you please tell me what am I doing wrong?
@JamesFluhler
@JamesFluhler 8 лет назад
if you are getting the wrong character it means the baud rate of your mcu and your computer are different. as Larin suggested try setting your F_CPU to 8000000 (8MHZ) and also try disabling the CKDIV. basically it works like this the mcu is sending bits (0/1) if the timing is off then the computer will miss bits and thus display the incorrect character. EG if the cpu is expecting 1 bit per second but the mcu is sending say 2 bits per second then the computer would only see every other bit send by the mcu. In your code when you define F_CPU you are telling the processor what its clock speed is, if you tell it the wrong speed it doesnt know that and all further calculations based off the clock speed will be wrong.
@francecop9454
@francecop9454 8 лет назад
Thanks James. But, the problem was actually my cable - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.
@fachriyasir661
@fachriyasir661 3 года назад
Does anyone know why the serial option in my tera term is disabled?? please help
@xavorol
@xavorol 3 года назад
you probably need to change to COM port you're trying to communicate over. Go to device manager>view>show hidden devices>ports. There you can check which port handles de USART, so you can choose it in tera term and it''ll let you set up the serial option.
@victorvasconcelos8894
@victorvasconcelos8894 6 лет назад
Materials ? please
@smitp1494
@smitp1494 6 лет назад
please will you help me to solve Error 'UBRR0H' undeclared (first use in this function) please anyone help me ?
@andymouse
@andymouse 5 лет назад
did you put a letter instead of a number "0" ?
@Mynkpl
@Mynkpl 2 года назад
@@andymouse To use UBRR0H, you will need to include
@andymouse
@andymouse 2 года назад
@@Mynkpl Better late than never !...cheers.
@janszymanski9947
@janszymanski9947 3 года назад
the link given You can find the code for this video and other AVR-C tutorials at: full.sc/1eS82Ps links to spam ???
@IreshSenadeera
@IreshSenadeera 2 года назад
It's not spam. He used a link shortner website, but since it's been a few years, the link is dead and it redirects to link shortner websites default page. He didn't purposely put spam. It's just been a loong time since he made the video.
@jobaptist
@jobaptist 5 лет назад
can you write a program code for an atm machine. i need this example for my school project... i am also trying to obtain the diebold dispenser C++ source codes for my school project. please help
@andymouse
@andymouse 5 лет назад
It's your project for school right? Dont ask people to write your fucking code for you it's rude and wrong, do like the rest of us here, and learn it.
@luimarcilui
@luimarcilui 10 лет назад
For me it doesn't work, tera term doesn't print out anything. Thank you for your help. I am only 12
@humanHardDrive
@humanHardDrive 10 лет назад
Marcell Veszpremi Can you send me an email, humanHardDrive@gmail.com, with your code.
@tedpep3158
@tedpep3158 3 года назад
My friend told me that your name is f*** even though I think it cool, sorry
@enverismail6864
@enverismail6864 5 лет назад
great job your spit is very annoying tho
Далее
Learning AVR-C Episode 11: Serial Communication (RX)
13:14
AVR USART (Serial Communication) Explained
26:41
Просмотров 35 тыс.
When Goalkeepers Get Bored 🤯 #3
00:27
Просмотров 2,4 млн
megaAVR Microcontrollers: UART Interrupts
19:19
Просмотров 4,2 тыс.
I2C Bus Programming On AVR Microcontollers
14:09
Просмотров 14 тыс.
Learning AVR-C Episode 9: External Interrupts
15:04
Просмотров 50 тыс.
Arduino Serial Communication using UART
15:33
Просмотров 158 тыс.
HYDRAULIC PRESS KNIFE VS CARBON FIBER AND TITANIUM
8:07
how does UART work??? (explained clearly)
10:52
Просмотров 306 тыс.
Arduino - Send Commands with Serial Communication
17:23