Become a leader in the IoT community!

Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.

Step 1 of 5

CREATE YOUR PROFILE *Required

OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Connect & collaborate 🤝with other tech professionals
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Help with Driver Development for HT16C21

I need to write driver for this
I cannot seem to understand
What does this table means

It is connect to driver ic ht16c21

Which has ram mapping but i have no idea how to let say display 4 on segment number 1
file0.jpg

  1. sageboy0918#0000

    This is a ram layout of the memory. And each address in the memory is a map for glowing the particular led on the display. To glow a particular led on a display you have to write to that memory address.

  2. sageboy0918#0000

    Oh wait a sec it is a pin diagram of that led (maybe lcd )

  3. sageboy0918#0000

    Display.

  4. melta101#0000

    from what i can see from only this sheet
    i feels like a pin mapping of (1-22) and common lines(COM1 -COM4)
    when you connect these, it activates a certain part on the display

    for ex: the blue tooth display is denoted with: S1
    which with pin 21 anf COM1,

  5. sageboy0918#0000

    Ok from what I can interpret is.
    You need an ic to drive this led display and
    if you don’t have and you are directly connecting each pin to the microcontroller then you have to write the firmware for controlling this led display yourself.
    You can think of pins like a matrix.
    So if you give power to com1 (pin2) and 4A (pin7).. there is mentioned that 4A , in the diagram you can see written 4 that is seven segments to which it is connected and A means it is connected to the top part segment of that seven segment.
    Like this every part of the display is connected.
    Like if you want to glow that bluetooth icon you have to power S1.
    Go to the table and find the pins. It is connected with pin 21 and com1 which is pin 2. Let’s turn those pins on and your bluetooth icon will glow.

  6. sageboy0918#0000

    🥲… I didn’t see you had mentioned the driving ic.

  7. sageboy0918#0000

    Oh!.. I see it is connected to ht16c21 check it datasheet and you can find it communication protocols and the command to write buffer in the ram

  8. sageboy0918#0000

    It is similar to my last project.

  9. sageboy0918#0000

    Ig.

  10. sageboy0918#0000

    If you face any problem you can ask more

  11. electro_coco#0000

    @sageboy0918
    I did read the datasheet it does have memory map

    Com1-4 are columns
    Seg0-15 are rows in memory map

    In order to control the display i think i have to make some sort of map

    Since in picture there is pin layout e.g to turn 1st display and display digit 4 on it i have first put address of seg8 in ram memory and then turn on com2 and 3

  12. sageboy0918#0000

    Can you share the datasheet?

  13. electro_coco#0000

    Sure

  14. electro_coco#0000

    Here it is

  15. sageboy0918#0000

    Read the data sheet from section 5.12

  16. sageboy0918#0000

    Just giving hints so that you can learn yourself

  17. sageboy0918#0000

    I assume you are using i2c

  18. sageboy0918#0000

    It contains information regarding how to send ram buffer

  19. sageboy0918#0000

    Regarding the size and shape of the buffer read from section 5.2

  20. sageboy0918#0000

    I hope you know how i2c works.

  21. electro_coco#0000

    I know how ic works
    I need to know how to make display work with memory map

    And make user friendly api

  22. sageboy0918#0000

    Read datasheets from here

  23. sageboy0918#0000

    You have to send data in a particular order over i2c so that the driver can interpret it

  24. sageboy0918#0000

    Yes you are right, good.
    But you have to tell the driver what thing you are sending to it.
    For telling that there are some commands.

  25. sageboy0918#0000

    For that you have to read section 5.12

  26. sageboy0918#0000

    Like you first send 00 which tells the driver you are going to send ram data next

  27. sageboy0918#0000

    Have you got it?

  28. electro_coco#0000

    I got it i need to create map based on seg for each display and com related to that display

    E.g seg 8 and 7 control display 1 abcdefg
    So i have to make map for it and then do something more

  29. sageboy0918#0000

    Yes. I haven’t read the whole datasheet you have to figure that out everything by yourself.
    But you are on a correct path 👏.
    There are more commands inside it , like make a led blink and driver handle it by itself you don’t have to write code for it you just have to send command.
    Make sure you read the full datasheet properly and utilizes the display’s full potential.

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @chitour
    600 XP
  • 5.
    Avatar
    @lifegochi
    250 XP
  • 6.
    Avatar
    @Youuce
    180 XP