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
Community Hub
Community Hub
Member's Forum introduction new member
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 21 replies
  • Subscribers 535 subscribers
  • Views 3943 views
  • Users 0 members are here
  • lcd display
  • microcontrollers
Related

introduction new member

hazard
hazard over 3 years ago

hi every one, I'm new on the community, first I wanna thanks for the project.
I'm start work with embedded systems, directation to  microcontroller, preferenced atmel (atmega 328p).
I allready have started with 328p and on lcd 40x02 with st7066 driver.
if any one can help me or give a force, I have some sub-routine work fine.
one more time thanks

  • Sign in to reply
  • Cancel

Top Replies

  • Jan Cumps
    Jan Cumps over 3 years ago in reply to hazard +2
    Sitronix left, Hitachi old mid Hitachi newer right Here's a link to my port of the driver: https://github.com/jancumps/hercules_libraries/tree/master/lcd To map code to flowchart. Line 164…
  • beacon_dave
    beacon_dave over 3 years ago in reply to hazard +1
    A while ago Atmel produced a short training series on the AVR based around the Atmel Xplained Mini ATmega328P dev board. Getting Started with AVR https://www.youtube.com/watch?v=UMi6lg563BA&list=PLtQdQmNK_0DRhBWYZ32BEILOykXLpJ8tP…
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to genebren +1
    I ported this driver to other controllers and a linux device. I also did it without Arduino. But I used their code as a starting point. In your case, the Arduino driver is already targeted to your controller…
Parents
  • genebren
    0 genebren over 3 years ago

    Welcome to the element14 community!  There are plenty of great projects other cool write ups that you can use to help you learn more about the ATmega 328p.  Check out all of the Arduino Projects under "Challenges & Projects/Arduino".

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hazard
    0 hazard over 3 years ago in reply to genebren

    hello thanks for your answer,

    but I wanna work without arduino, just with atmega328p, I dont wann use libray for now, for best understand the code, and leran a lithe more,

    thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hazard
    0 hazard over 3 years ago in reply to genebren

    the N I can put it work nice, N=1 for 1line and N=1 for 2 line,

    the DL is always 0, I think it's work good beacuse I can display caracther on displa.

    but when tyr change de F to 0 or 1  nothing hapen :D

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • genebren
    0 genebren over 3 years ago in reply to hazard

    I can not imagine that the format of the commands should ever change depending on the 4/8bit mode.  Sometimes it is helpful to look at the specification of other chips that are listed as compatible.  Here is a link to a compatible chip that might help you figure out the issues.

    https://www.sparkfun.com/datasheets/LCD/HD44780.pdf

    Good luck.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 3 years ago in reply to genebren

    I ported this driver to other controllers and a linux device. I also did it without Arduino. But I used their code as a starting point.

    In your case, the Arduino driver is already targeted to your controller. Taking the Arduino code and removing the Arduino specifics should be a doable exercise.

    You have a library that's known to work with the display. And you remove the flavour that you don't want in your code.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • genebren
    0 genebren over 3 years ago in reply to Jan Cumps

    This is a very good point.  Working from a know good starting point (existing library), allows you to see an example of how to write your standalone software.  Also, if you have an Arduino, you can write a simple program to control the LCD, proving that it is functional.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hazard
    0 hazard over 3 years ago in reply to genebren

    I have some arduinos, and some times  I test with some library for check if is every thing ok., after tested onvarduido I start "coding" on MCstudio.

    I will check hd44780 data sheet .

    thanks

    I will return with feedback

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hazard
    0 hazard over 3 years ago in reply to Jan Cumps

    I will check this, thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hazard
    0 hazard over 3 years ago in reply to genebren

    hello

    I see on the 44780, and we can coclusion they have a mystake on st7066 datasheet, on pag 20, the N and F bit are repositioned, right?

    thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 3 years ago in reply to hazard

    Sitronix left, Hitachi old mid Hitachi newer right

    image image image

    Here's a link to my port of the driver: https://github.com/jancumps/hercules_libraries/tree/master/lcd

    To map code to flowchart.

    Line 164 of my driver is the very first command in the lowest block:

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 3 years ago in reply to genebren

    Totally agree. Even if it's a learning exercise to do it from scratch, it is still worthwhile using existing code if possible first, as some sort of testbench, otherwise sometimes many hours can be wasted if the problem is elsewhere too (e.g. bad wiring or if the contrast voltage is physically not set correctly on the appropriate pin).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 3 years ago in reply to shabaz

    Yes. Having a working setup that you can look at, probe, ...

    Else, you're always wondering if it is a hardware fault. And that does not help solving software issues.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Jan Cumps
    0 Jan Cumps over 3 years ago in reply to shabaz

    Yes. Having a working setup that you can look at, probe, ...

    Else, you're always wondering if it is a hardware fault. And that does not help solving software issues.

    • Cancel
    • Vote Up 0 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