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.
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
@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.
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?
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.
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),
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).
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 )
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!
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.
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
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.
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.
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
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.
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.
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
I don't know if you keep going with this channel, but THANK YOU!
It's clear and well explained!
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.
Re-uploaded, and everything looks good.
Hy i tried your code on my project ... and im getting sum unknown characters (like this -- "ÿ wïô¬ýÍtî«ÿLïù›ò·ï{w[÷ŽùÙÕ›{wß
And Thanks for the code :D
Brilliant work. I've seen code that sets it up, but nothing that explained like you did. Thanks. Very helpful!
Hey dude, really great tutorial. I feel learning how to read the datasheet is exactly what I need to learn to do better.
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
@Aden Valentin Instablaster :)
@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.
@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
@Aden Valentin no problem :D
Nice work! Can you do a lcd tutorial using 4bit mode? Thanks
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?
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.
Any ideas why it does not work for higher baud rates?
the website for the code doesn't work anymore but good guide
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),
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).
really appreciate these video series. The link is not working though :( please take a look
Weww! it's really detail explanations! Thanks!
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 )
How to do this for 115200, just changing the baudrate in the code does not work...
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
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
Master Piece!I hope you can go on do the perfect job!
Micrcontroller sening null charactor always when i dont want to transmit.....can you fix it??? And i need some help in fixing with esp8266
Tried your code verbatim with the SMD of that chip and it doesn't work at all. Any ideas?
As far as the warning about strlen() goes, you forgot the header file, that is why it's complaining. Please consider fixing this.
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!
brc is baud rate converter
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.
Many thanks - this episode works fine now!
Where do you get that USB cable ?
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
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.
does it works on atmega16a ?
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?
+France Čop Got it - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.
Hello,
How can i print out a char. For example
char a='a';
serialprint(WHAT SHOULD I PUT HERE.)
You would put test in this example
char test='b' ;
serialprint(test);
17:33 mistake in the code, it should be: serialReadPos = 0; But anyway, thanks for great lessons!
Does it work with a DFU bootloader ?
Thank you so much , very good education videos :D
Thank you very much.. Code nicely works...
This is great stuff!
the link given You can find the code for this video and other AVR-C tutorials at:
full.sc/1eS82Ps links to spam ???
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.
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?
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
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?
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.
Thanks James.
But, the problem was actually my cable - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.
Materials ? please
Great. Thank you.
very good, congratulation
thanks !
Does anyone know why the serial option in my tera term is disabled?? please help
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.
ECE 312, UofA.
LOLCAT, you wrote "BUAD"...XD
Excellent
thank you ❤❤❤
Very nice!
add this to playlist
please will you help me to solve
Error 'UBRR0H' undeclared (first use in this function) please anyone help me ?
did you put a letter instead of a number "0" ?
@@andymouse To use UBRR0H, you will need to include
@@Mynkpl Better late than never !...cheers.
Thanks :)
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
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.
For me it doesn't work, tera term doesn't print out anything. Thank you for your help. I am only 12
Marcell Veszpremi Can you send me an email, humanHardDrive@gmail.com, with your code.
My friend told me that your name is f*** even though I think it cool, sorry
great job your spit is very annoying tho