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

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 75

  • @EalhamAlMusabbir
    @EalhamAlMusabbir 7 лет назад +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 5 лет назад +5

    I don't know if you keep going with this channel, but THANK YOU!
    It's clear and well explained!

  • @humanHardDrive
    @humanHardDrive  11 лет назад +9

    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

  • @johnbattaglia6369
    @johnbattaglia6369 7 лет назад +2

    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 лет назад +6

    Nice work! Can you do a lcd tutorial using 4bit mode? Thanks

  • @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?

  • @deddicarles1725
    @deddicarles1725 4 года назад

    Weww! it's really detail explanations! Thanks!

  • @aquacode2
    @aquacode2 6 лет назад +1

    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.

  • @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).

  • @ashwin372
    @ashwin372 3 года назад

    really appreciate these video series. The link is not working though :( please take a look

  • @GfastGao
    @GfastGao 10 лет назад

    Master Piece!I hope you can go on do the perfect job!

  • @raysovilj
    @raysovilj 4 года назад

    Any ideas why it does not work for higher baud rates?

  • @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),

  • @mosleyau
    @mosleyau 8 лет назад

    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

  • @maheshgaur143
    @maheshgaur143 9 лет назад

    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

  • @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 )

  • @JAGANNATHSAHOOtheraw
    @JAGANNATHSAHOOtheraw 8 лет назад

    Micrcontroller sening null charactor always when i dont want to transmit.....can you fix it??? And i need some help in fixing with esp8266

  • @TheEsat66
    @TheEsat66 7 лет назад

    How to do this for 115200, just changing the baudrate in the code does not work...

  • @YashPatil26
    @YashPatil26 6 лет назад

    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?

  • @Alymissy
    @Alymissy Год назад

    the website for the code doesn't work anymore but good guide

  • @videolan
    @videolan 11 лет назад

    Many thanks - this episode works fine now!

  • @MrMitdac01
    @MrMitdac01 6 лет назад

    Thank you so much , very good education videos :D

  • @bhathiyabandara4390
    @bhathiyabandara4390 6 лет назад

    Thank you very much.. Code nicely works...

  • @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.

  • @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 7 лет назад +1

      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.

  • @luimarcilui
    @luimarcilui 10 лет назад

    Hello,
    How can i print out a char. For example
    char a='a';
    serialprint(WHAT SHOULD I PUT HERE.)

    • @havocdev
      @havocdev 10 лет назад

      You would put test in this example
      char test='b' ;
      serialprint(test);

  • @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.

  • @nazatkabir3442
    @nazatkabir3442 7 лет назад +1

    brc is baud rate converter

  • @kinghenry238
    @kinghenry238 7 лет назад

    Where do you get that USB cable ?

  • @DavidChipman
    @DavidChipman 10 лет назад +1

    As far as the warning about strlen() goes, you forgot the header file, that is why it's complaining. Please consider fixing this.

  • @tradegrabber4854
    @tradegrabber4854 8 месяцев назад

    17:33 mistake in the code, it should be: serialReadPos = 0; But anyway, thanks for great lessons!

  • @PentaxSource
    @PentaxSource 8 лет назад

    This is great stuff!

  • @Joutubbb
    @Joutubbb 8 лет назад

    Does it work with a DFU bootloader ?

  • @rubensalves3899
    @rubensalves3899 6 лет назад

    very good, congratulation

  • @70da24
    @70da24 6 лет назад

    does it works on atmega16a ?

  • @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 лет назад +1

      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 4 года назад

    Does anyone know why the serial option in my tera term is disabled?? please help

    • @xavorol
      @xavorol 4 года назад

      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.

  • @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.

  • @victorvasconcelos8894
    @victorvasconcelos8894 7 лет назад

    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 года назад +1

      @@andymouse To use UBRR0H, you will need to include

    • @andymouse
      @andymouse 2 года назад

      @@Mynkpl Better late than never !...cheers.

  • @aliemad9455
    @aliemad9455 3 года назад

    thank you ❤❤❤

  • @siddharthmali5841
    @siddharthmali5841 3 года назад

    Great. Thank you.

  • @andread81yt
    @andread81yt 11 лет назад

    Very nice!

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo 5 лет назад

    Excellent

  • @demetriusdemarcusbartholom8063
    @demetriusdemarcusbartholom8063 2 года назад

    ECE 312, UofA.

  • @ukaszOstapiuk
    @ukaszOstapiuk 11 лет назад

    add this to playlist

  • @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 лет назад +1

      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.

  • @xelionizer
    @xelionizer 7 лет назад +2

    LOLCAT, you wrote "BUAD"...XD

  • @_Iokanaan_Marusidze_
    @_Iokanaan_Marusidze_ 3 года назад

    thanks !

  • @onurolce7389
    @onurolce7389 11 лет назад

    Thanks :)

  • @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 лет назад +1

      Marcell Veszpremi Can you send me an email, humanHardDrive@gmail.com, with your code.

  • @tedpep3158
    @tedpep3158 4 года назад

    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