Giter Club home page Giter Club logo

avelabs-project's Introduction

Avelabs-Project

#In this project, you are supposed to implement an application that generates a software PWM using a software PWM driver.

Please use this datasheet as your guide through your implementation.

Suppose you have the GPIO/DIO driver that has the following APIs:

#define IN 0 #define OUT 1 #define LOW 0 #define HIGH 1

/*

  • pinNumber: is an input argument that describes the pin number in each port, 0, 1, 2, ... etc.
  • port: is an input argument that describes port character, 'A', 'B', ... etc.
  • direction: is an input argument that describes the data direction on a specific pin, IN or OUT */ void DIO_init(uint8_t pinNumber, uint8_t port, uint8_t direction);

/*

  • pinNumber: is an input argument that describes pin number in each port, 0, 1, 2, ... etc.
  • port: is an input argument that describes port character, 'A', 'B', ... etc.
  • value: is an input argument that describes the value on a specific pin, LOW or HIGH */ void DIO_write(uint8_t pinNumber, uint8_t port, uint8_t value);

/*

  • pinNumber: is an input argument that describes pin number in each port, 0, 1, 2, ... etc.
  • port: is an input argument that describes port character, 'A', 'B', ... etc. */ void DIO_toggle(uint8_t pinNumber, uint8_t port);

Use PIN 0 in port A as the PWM pin for the SW PWM driver.

You should implement the following SW PWM APIs:

/*

  • frequency_kh: is an input argument that describes the frequency in KHz.
  • dutyCycle: is an input argument that describes the duty cycle needed for the PWM that varies from 0 to 100 ( 0 means 0%, and 100 means 100%). */ void SWPWM_init(uint32_t frequency_kh, uint8_t dutyCycle);

/*

  • This function is to start PWM generation. */ void SWPWM_start(void);

/*

  • newDutyCycle: is an input argument that describes the new duty cycle needed for the PWM. */ void SWPWM_changeDutyCycle(uint8_t newDutyCycle);

/*

  • This function is to stop PWM generation. */ void SWPWM_stop(stop);

Requirements Implement an application that will generate a PWM signal that changes from 0% duty cycle to 100% duty cycle with a 1% step Each step will take 1ms The PWM has a 1KHz frequency

What to deliver Timer driver, TIMER_init, TIMER_set, TIMER_start, TIMER_stop, and TIMER_getstate, for each timer you use The SW PWM driver The application

How to submit Please upload the code for this project to GitHub, and post a link to your repository below.

Note This project must be submitted during the assessment time.

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.