Giter Site home page Giter Site logo

Comments (7)

Johnlon avatar Johnlon commented on June 30, 2024

Hi,
Yes send the code for interest.
What's the advantage of using ASM over C?

from sevensegmentmodule.

Johnlon avatar Johnlon commented on June 30, 2024

Hi,
Yes send the code for interest.
What's the advantage of using ASM over C?

from sevensegmentmodule.

Tabbod avatar Tabbod commented on June 30, 2024

Advantages are code size and speed, especially for 8-bit pic asm as the instruction set wasn't designed with a compiler in mind. And for simple tasks like multiplexing a display, it allows you to minimize the time spent switching one digit off and the other on.

Attached. Apart from the init code, everything runs inside the interrupt handler:
16F18446_BMD_01_src.asm.txt
16F18446_BMD_01.X.production.hex.txt

from sevensegmentmodule.

Johnlon avatar Johnlon commented on June 30, 2024

from sevensegmentmodule.

Tabbod avatar Tabbod commented on June 30, 2024

It certainly makes sense, and with most other microcontrollers there would be little reason to enter into an assembly solution.

And you are right, the difference in power consumption is negligible. I did test with and without sleep, the current draw difference doesn't even come to a milliamp.

But using a hardware timer in conjunction with sleep allows you to turn the clock speed right up, which benefits my next point.

The main goal here was tightening up the multiplexing routine to vastly reduce dead time when switching between the digits (increasing apparent brightness), as there are multiple ports involved in driving the segments.

from sevensegmentmodule.

Johnlon avatar Johnlon commented on June 30, 2024

from sevensegmentmodule.

Johnlon avatar Johnlon commented on June 30, 2024

Thanks for the info

from sevensegmentmodule.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.