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 536 subscribers
  • Views 3931 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
Reply
  • 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
Children
  • genebren
    0 genebren over 3 years ago in reply to hazard

    I completely understand that, as I too prefer working outside of the Arduino environment.  I prefer the ATmega328PB, as I appreciate the extra serial port, but I have also used the atmega328p and the atmega168p chips in some projects.  In the search box at the top of the screen enter 'atmega328p' and you will find a bunch of projects using these chips.

    If there is an area that you are looking to learn more about, try and ask some specific questions and I sure that there are members here who would glad to point you to some useful posts or offer some advice.

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

    I wIll see the project on the forum of course. I'm very knew on this, embedded systems , I have already started, and I can put some sub-routine from st7066 work fine. but it's on begin.
    now i'm try generat my own "character" in CGRAM,
    but first if you can tell me one thing aabout the "function set" from datasheet of ST7066 I will apreaciate your time and kindness.
    on pag 13 the bit are: DB5=1;DB4=DL;DB3=N;DB2=F;DB1=x;DB0=x;
    on pag 20 on fluxogram for "softreset/init ..." in 4 bit mode interface
    in a few lines before "Initialization end" the function set code for send the bit in 2 times, the sequence is not the same on the table from pag 13. the N and F bit are in position DB1 and DB0.
    can you understand my question? I'm sorry my inglish I'm Portuguese :D

    datsheet:

    www.google.com/url

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

    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

    May be of some interest ?

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

    I already due some class, begin C, mplabx user,advance c/c++, etc... :D thanks for the tip.

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

    Looking through the specification, I do see the the same thing (the N and F bits are repositioned).  A lot of the specifications that I have used often do have errors, especially in the examples.  I would send the N and F bits in DB3 and DB2 as shown on page 13.

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

    Keep in mind that while using the 4-bit mode, the data is sent using the DB7 through DB4 (not DB3  to DB0).

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

    yes I, only use DB7->DB4,  have have tryed the two ways, but nothing happen. I think it's not a mistake, maybe is for work in 4bit mode.

    first I send the high niblble

    second the low nibble in the corectly posiiton, .

    if you look at the entry mode set,  or display clear they not have change the bit position,

    in 4bit mode the config DB on function set are ok, I should be use the way of pag 20. but anyway I cant put it work, beacause I cant change the fonte size from 5*8 dot to 5*11 dot, I need read more information about this, I dont know yeat if the 5*11 its only for caracter genarator ou the pattern caracter from DDRAM.

    thanks so much for your help

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