element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
  • About Us
  • 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
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum Basic pocket computer display modification
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 32 replies
  • Subscribers 35 subscribers
  • Views 5691 views
  • Users 0 members are here
  • pc
  • build
  • code
  • pocket
  • display
  • ben_heck
  • basic
Related

Basic pocket computer display modification

ryan27968
ryan27968 over 12 years ago

Hi ben. I was watching old versions of your show and was wondering what is involved in changing the code for your basic pocket computer to work on a 20 by 4 display instead of a 16 by 4. I have tried messing around with the code but with no luck. Thanks in advance.

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    WARNING! I DO NOT HAVE ANY HARDWARE TO TEST THIS WITH! THIS MAY STILL BE BROKEN! tl;dr Now that that's out of the way, here's a (potentially) fixed copy of the script: https://gist.github.com/zanothis…
  • ryan27968
    ryan27968 over 12 years ago

    is there no one who can help me here?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • benheck
    benheck over 12 years ago in reply to ryan27968

    Did you use the original source code? That was meant for a 20x4 display.

     

    -Ben

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ryan27968
    ryan27968 over 12 years ago

    original? what do you mean?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • benheck
    benheck over 12 years ago in reply to ryan27968

    These files.

    Attachments:
    1273.pocker_BASIC.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ryan27968
    ryan27968 over 12 years ago in reply to benheck

    this is the same code that i originally used, but it still does not work. this is written for a 16 by 4  not a 20 by 4.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rhyse302
    rhyse302 over 12 years ago in reply to ryan27968

    Did you use the 4 bit monitor?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ryan27968
    ryan27968 over 12 years ago

    Yes. my setup is EXACTLY the same except its a 20X4 screen.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rhyse302
    rhyse302 over 12 years ago in reply to ryan27968

    It should work. It could be you need to use a special format or there is a flaw in the wiring.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • benheck
    benheck over 12 years ago in reply to ryan27968

    Ah, you probably need to re-arrange screen memory so it doesn't overflow the lines.

     

    Look through the code for instances of 16, or multiples thereof.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to benheck

    crossposted to a new thead

     

    I am too having problems getting my 20*4 screen (https://www.sparkfun.com/products/9568) working. I tried changing anything I could imagine having anything to do with the number of  columns in the lcdChar (), doFrame () and setup () routines. Do you know which lines exactly must be changed in order to get a clean output?

    thanks.

    ___________

    Edit (13.8.);

    I got it PARTLY working! THE 4 RIGHTMOST CHARS IN THE FIRST LINE ARE STILL MISSING AND DISPLAYED AT THE BEGINNING OF THE THIRD LINE. Anyone got help? For anyone who wants to know how, I changed the following lines in Tinybasic_2.ino (you find it here: http://www.element14.com/community/thread/25177?start=14&tstart=9)

    Line Nr.From (original code)To (modified code)
    23int screenMem[72];int screenMem[76];
    1481if (cursorX < 16) {if (cursorX < 20) {
    1489if (cursorX == 16 or c == 10) {if (cursorX == 20 or c == 10) {
    1491for (int xg = 0 ; xg < 16 ; xg++) {for (int xg = 0 ; xg < 20 ; xg++) {
    1494screenMem[40 + xg] = screenMem[20 + xg];screenMem[40 + xg] = screenMem[16 + xg];
    1495screenMem[16 + xg] = screenMem[56 + xg];screenMem[20 + xg] = screenMem[56 + xg];
    1503doFrame(56);doFrame(60);
    1535lcd.begin(16, 4);lcd.begin(20, 4);
    1537for (int xg = 0 ; xg < 72 ; xg++) {for (int xg = 0 ; xg < 76 ; xg++) {
    1543doFrame(56);doFrame(60);
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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