element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Sending a signal over a pin
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 392 subscribers
  • Views 1253 views
  • Users 0 members are here
  • signals
Related

Sending a signal over a pin

rishi2628
rishi2628 over 10 years ago

Is there any function in atmel studio or arduino that would help me send an 8 bit signal oven the B0 pin of atmega328p?

  • Sign in to reply
  • Cancel

Top Replies

  • gihu
    gihu over 10 years ago +3
    Hi, Serial library only works on pins with dedicated UART, ie in the UNO digital pin 0 and 1. For sending serial data over other pins you can use the SoftwareSerial library, which emulates the hardware…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago +3
    Is there a reason you specifically want to use B0 or will any pin do Have you also considered using the I2C bus as this will also send 8 bts at a time to a destination via a hardwre UART, just a different…
  • balearicdynamics
    balearicdynamics over 10 years ago +1
    Hello Rishi, if you need to send 8 bit on a single pin as a matter of fact it is a serialised byte. One option is to use the hardware serial, with the limitation of pins 0 and 1 that are connected to the…
Parents
  • balearicdynamics
    0 balearicdynamics over 10 years ago

    Hello Rishi,

     

    if you need to send 8 bit on a single pin as a matter of fact it is a serialised byte. One option is to use the hardware serial, with the limitation of pins 0 and 1 that are connected to the dedicated UART (there is only one) on Arduino. There is the problem too that if your board has a USB connection this two pins are redirected to the serial to USB converter that may generate issues.

     

    The alternate case - if you want a "ready-to eat" solution is the software serial  library, that with some interrupt-based trick manages independent timing to make almost any digital Arduino PIN available for the serial transmission. Personally I have used it in past just for experiment and I have found several issues.

     

    Instead, if you send in a single direction 8 bit at a time, you can take inspiration from the Tom Igoe's software serial (I suggest to download the last updated version that has less bugs and limitations than the previous) and starting from this library - that is, a C++ class - create your own class to solve your specific problem.

    If you can be more precise instead maybe we can find a more specific solution, as it seems that you need a "serialisation" but not a conventional serial transmission so many parts of the library can be ignored or simplified.

     

    Take also in account the possibility to use the 1-Wire library to manage the serial transmission over a single channel. But also in this case it is again a protocol for a standardised data bus so you should adapt your needs to the 1-Wire specifications.

     

    Let us know what you have really in mind and we try to help you better.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • balearicdynamics
    0 balearicdynamics over 10 years ago

    Hello Rishi,

     

    if you need to send 8 bit on a single pin as a matter of fact it is a serialised byte. One option is to use the hardware serial, with the limitation of pins 0 and 1 that are connected to the dedicated UART (there is only one) on Arduino. There is the problem too that if your board has a USB connection this two pins are redirected to the serial to USB converter that may generate issues.

     

    The alternate case - if you want a "ready-to eat" solution is the software serial  library, that with some interrupt-based trick manages independent timing to make almost any digital Arduino PIN available for the serial transmission. Personally I have used it in past just for experiment and I have found several issues.

     

    Instead, if you send in a single direction 8 bit at a time, you can take inspiration from the Tom Igoe's software serial (I suggest to download the last updated version that has less bugs and limitations than the previous) and starting from this library - that is, a C++ class - create your own class to solve your specific problem.

    If you can be more precise instead maybe we can find a more specific solution, as it seems that you need a "serialisation" but not a conventional serial transmission so many parts of the library can be ignored or simplified.

     

    Take also in account the possibility to use the 1-Wire library to manage the serial transmission over a single channel. But also in this case it is again a protocol for a standardised data bus so you should adapt your needs to the 1-Wire specifications.

     

    Let us know what you have really in mind and we try to help you better.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube