profet27a 2.0.0.0
main.c File Reference

PROFET 2 7A Click Example. More...

#include "board.h"
#include "log.h"
#include "profet27a.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

PROFET 2 7A Click Example.

Description

This example showcases the ability of the PROFET 2 7A Click board. It configures Host MCU for communication and then enables and disables output channel. Besides that, it reads the voltage of IS pin and calculates current on output for the channel 0.

The demo application is composed of two sections :

Application Init

Initialization of the communication modules(ADC and UART) and additional pins for controlling the device.

Application Task

On every iteration of the task device switches between DIAGNOSTIC and OFF mode while it reads the voltage of IS pin and with that calculates current on output for channel 0.

Note
Formula for calculating current on load: I_load = voltage(IS) x kILIS(5450) / rsens(1.2 kΩ)

Click board won't work properly on the PIC18F97J94 MCU card.

Author
Luka Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )