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

Sdílet
Vložit
  • čas přidán 4. 09. 2024

Komentáře • 76

  • @EalhamAlMusabbir
    @EalhamAlMusabbir Před 6 lety +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 Před 4 lety +5

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

  • @humanHardDrive
    @humanHardDrive  Před 10 lety +9

    Re-uploaded, and everything looks good.

    • @vidbay119
      @vidbay119 Před 4 lety

      Hy i tried your code on my project ... and im getting sum unknown characters (like this -- "ÿ wïô¬ýÍtî«ÿLïù›ò·ï{w[÷ŽùÙÕ­›{wß

    • @vidbay119
      @vidbay119 Před 4 lety

      And Thanks for the code :D

  • @cbttrainer
    @cbttrainer Před 5 lety

    Brilliant work. I've seen code that sets it up, but nothing that explained like you did. Thanks. Very helpful!

  • @johnbattaglia6369
    @johnbattaglia6369 Před 6 lety +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 Před 3 lety

      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 Před 3 lety

      @Aden Valentin Instablaster :)

    • @adenvalentin7838
      @adenvalentin7838 Před 3 lety

      @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 Před 3 lety

      @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 Před 3 lety

      @Aden Valentin no problem :D

  • @Frisky0563
    @Frisky0563 Před 10 lety +6

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

  • @deddicarles1725
    @deddicarles1725 Před 3 lety

    Weww! it's really detail explanations! Thanks!

  • @aquacode2
    @aquacode2 Před 6 lety +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.

  • @GfastGao
    @GfastGao Před 10 lety

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

  • @jesusreignonhigh6732
    @jesusreignonhigh6732 Před 3 lety

    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?

  • @abrahamsibusiso6791
    @abrahamsibusiso6791 Před 5 lety

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

  • @quisyNeals
    @quisyNeals Před 7 lety

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

  • @videolan
    @videolan Před 10 lety

    Many thanks - this episode works fine now!

  • @ashwin372
    @ashwin372 Před 3 lety

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

  • @mosleyau
    @mosleyau Před 7 lety

    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

  • @raysovilj
    @raysovilj Před 4 lety

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

  • @MrMitdac01
    @MrMitdac01 Před 6 lety

    Thank you so much , very good education videos :D

  • @bhathiyabandara4390
    @bhathiyabandara4390 Před 6 lety

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

  • @JAGANNATHSAHOOtheraw
    @JAGANNATHSAHOOtheraw Před 7 lety

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

  • @YashPatil26
    @YashPatil26 Před 5 lety

    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 Před 6 lety

    Tried your code verbatim with the SMD of that chip and it doesn't work at all. Any ideas?

  • @nazatkabir3442
    @nazatkabir3442 Před 7 lety +1

    brc is baud rate converter

  • @TheEsat66
    @TheEsat66 Před 6 lety

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

  • @Alymissy
    @Alymissy Před rokem

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

  • @pankraftak1641
    @pankraftak1641 Před 8 lety

    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 )

  • @maheshgaur143
    @maheshgaur143 Před 8 lety

    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

  • @siddharthmali5841
    @siddharthmali5841 Před 3 lety

    Great. Thank you.

  • @DavidChipman
    @DavidChipman Před 9 lety +1

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

  • @PentaxSource
    @PentaxSource Před 7 lety

    This is great stuff!

  • @_Iokanaan_Marusidze_
    @_Iokanaan_Marusidze_ Před 2 lety

    thanks !

  • @andread81yt
    @andread81yt Před 10 lety

    Very nice!

  • @klemenapk
    @klemenapk Před 6 lety

    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 Před 6 lety +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.

  • @aqualung2000
    @aqualung2000 Před 2 lety

    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.

  • @rubensalves3899
    @rubensalves3899 Před 6 lety

    very good, congratulation

  • @francecop9454
    @francecop9454 Před 8 lety

    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 Před 8 lety

      +France Čop Got it - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.

  • @luimarcilui
    @luimarcilui Před 9 lety

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

    • @havocdev
      @havocdev Před 9 lety

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

  • @tradegrabber4854
    @tradegrabber4854 Před 4 měsíci

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

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo Před 5 lety

    Excellent

  • @aliemad9455
    @aliemad9455 Před 3 lety

    thank you ❤❤❤

  • @demetriusdemarcusbartholom8063

    ECE 312, UofA.

  • @kinghenry238
    @kinghenry238 Před 6 lety

    Where do you get that USB cable ?

  • @Arivien
    @Arivien Před 10 lety

    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 Před 10 lety +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 Před 8 lety

      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 Před 8 lety

      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 Před 8 lety

      Thanks James.
      But, the problem was actually my cable - I did't use the right cable - FTDI, just used the regular RS232. Problem solved.

  • @Joutubbb
    @Joutubbb Před 8 lety

    Does it work with a DFU bootloader ?

  • @70da24
    @70da24 Před 6 lety

    does it works on atmega16a ?

  • @fachriyasir661
    @fachriyasir661 Před 3 lety

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

    • @xavorol
      @xavorol Před 3 lety

      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.

  • @janszymanski9947
    @janszymanski9947 Před 3 lety

    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 Před rokem

      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.

  • @ukaszOstapiuk
    @ukaszOstapiuk Před 10 lety

    add this to playlist

  • @onurolce7389
    @onurolce7389 Před 10 lety

    Thanks :)

  • @xelionizer
    @xelionizer Před 7 lety +2

    LOLCAT, you wrote "BUAD"...XD

  • @smitp1494
    @smitp1494 Před 6 lety

    please will you help me to solve
    Error 'UBRR0H' undeclared (first use in this function) please anyone help me ?

    • @andymouse
      @andymouse Před 4 lety

      did you put a letter instead of a number "0" ?

    • @Mynkpl
      @Mynkpl Před 2 lety +1

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

    • @andymouse
      @andymouse Před 2 lety

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

  • @victorvasconcelos8894
    @victorvasconcelos8894 Před 6 lety

    Materials ? please

  • @jobaptist
    @jobaptist Před 5 lety

    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 Před 4 lety +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.

  • @luimarcilui
    @luimarcilui Před 10 lety

    For me it doesn't work, tera term doesn't print out anything. Thank you for your help. I am only 12

    • @humanHardDrive
      @humanHardDrive  Před 10 lety +1

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

  • @tedpep3158
    @tedpep3158 Před 3 lety

    My friend told me that your name is f*** even though I think it cool, sorry

  • @enverismail6864
    @enverismail6864 Před 5 lety

    great job your spit is very annoying tho