我们的使命是为开发者提供一个方便且用户友好的诊断工具,简化硬件测试过程,确保开发过程更加顺利。
A
A
硬件概览
它是如何工作的?
Tester Click 是一款用于 mikroBUS™ 插座上的诊断工具的 Click board™。它包含一个 2x6 LED 阵列,用于显示每个引脚上高/低逻辑电平的存在,为开发者提供视觉反馈。两个额外的 LED 指示 mikroBUS™ 电源轨上的 +3.3V 和 +5V 的存在。这个简单的诊断工具可以节省数小时的故障排除时间,免去应用开发人员连接
各种复杂测量仪器的麻烦,只需测试特定 mikroBUS™ 引脚上的逻辑状态。mikroBUS™ 的每个引脚都连接到一个红色 LED,并由 1K 电阻保护。这允许处理高达 VCC 的电压,提供一种简单且清晰的引脚状态测试解决方案。一旦放置在 mikroBUS™ 插座上,不需要任何额外设置。除了 LED 之外,没有其他 IC 或其
他有源元件。其简单性使其非常易于使用:一旦连接,红色和绿色电源指示 LED 将显示 mikroBUS™ 电源轨上的 +3.3V 和 +5V 的存在。其余的 LED 阵列将根据各自引脚的状态点亮。
功能概述
开发板
Clicker 2 for Kinetis 是一款紧凑型入门开发板,它将 Click 板™的灵活性带给您喜爱的微控制器,使其成为实现您想法的完美入门套件。它配备了一款板载 32 位 ARM Cortex-M4F 微控制器,NXP 半导体公司的 MK64FN1M0VDC12,两个 mikroBUS™ 插槽用于 Click 板™连接,一个 USB 连接器,LED 指示灯,按钮,一个 JTAG 程序员连接器以及两个 26 针头用于与外部电子设备的接口。其紧凑的设计和清晰、易识别的丝网标记让您能够迅速构建具有独特功能和特性
的小工具。Clicker 2 for Kinetis 开发套件的每个部分 都包含了使同一板块运行最高效的必要组件。除了可以选择 Clicker 2 for Kinetis 的编程方式,使用 USB HID mikroBootloader 或外部 mikroProg 连接器进行 Kinetis 编程外,Clicker 2 板还包括一个干净且调节过的开发套件电源供应模块。它提供了两种供电方式;通过 USB Micro-B 电缆,其中板载电压调节器为板上每个组件提供适当的电压水平,或使用锂聚合物 电池通过板载电池连接器供电。所有 mikroBUS™ 本
身支持的通信方法都在这块板上,包括已经建立良好的 mikroBUS™ 插槽、重置按钮和几个用户可配置的按钮及 LED 指示灯。Clicker 2 for Kinetis 是 Mikroe 生态系统的一个组成部分,允许您在几分钟内创建新的应用程序。它由 Mikroe 软件工具原生支持,得益于大量不同的 Click 板™(超过一千块板),其数量每天都在增长,它涵盖了原型制作的许多方面。
微控制器概述
MCU卡片 / MCU

建筑
ARM Cortex-M4
MCU 内存 (KB)
1024
硅供应商
NXP
引脚数
121
RAM (字节)
262144
使用的MCU引脚
mikroBUS™映射器
“仔细看看!”
Click board™ 原理图

一步一步来
项目组装
软件支持
库描述
该库包含用于 Tester Click 驱动程序的 API。
Key functions:
- tester_set_pin_high- 此功能将指定引脚的输出电压设置为高电平
- tester_set_pin_low- 此功能将指定引脚的输出电压设置为低电平
开源
代码示例
完整的应用程序代码和一个现成的项目可以通过NECTO Studio包管理器直接安装到NECTO Studio。 应用程序代码也可以在MIKROE的GitHub账户中找到。
/*!
 * \file 
 * \brief Tester Click example
 * 
 * # Description
 * This example showcases how to initialize, configure and use the Tester Click. It is a simple
 * GPIO Click which is used to test if all the pins on a MikroBUS are working correctly.
 *
 * The demo application is composed of two sections :
 * 
 * ## Application Init 
 * This function initializes and configures the Click and logger modules.
 * 
 * ## Application Task  
 * This function sets the output on all the pins (one by one) on the left side to high, going
 * from top to bottom and then does the same with the ones on the right side, after which it 
 * sets all pins to high and after one second sets them back to low. 
 * 
 * \author MikroE Team
 *
 */
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "tester.h"
// ------------------------------------------------------------------ VARIABLES
static tester_t tester;
static log_t logger;
static digital_out_t *pin_addr[ 12 ] =
{
    &tester.mosi,    // 0 MOSI
    &tester.miso,    // 1 MISO
    &tester.sck,     // 2 SCK
    &tester.cs,      // 3 CS
    &tester.rst,     // 4 RST
    &tester.an,      // 5 AN
    &tester.pwm,     // 6 PWM
    &tester.int_pin, // 7 INT
    &tester.tx_pin,  // 8 TX
    &tester.rx_pin,  // 9 RX
    &tester.scl,     // 10 SCL
    &tester.sda      // 11 SDA
};
// ------------------------------------------------------- ADDITIONAL FUNCTIONS
static void blink ( digital_out_t *pin ) 
{
    tester_set_pin_high( pin );
    Delay_100ms( );
    tester_set_pin_low( pin );
}
static void all_on ( )
{
   int i;
   for( i = 0; i < 12; i++ )
   {
        tester_set_pin_high( pin_addr[ i ] );
   }
}
static void all_off ( )
{
   int i;
   for( i = 0; i < 12; i++ )
   {
        tester_set_pin_low( pin_addr[ i ] );
   }
}
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( )
{
    log_cfg_t log_cfg;
    tester_cfg_t cfg;
    /** 
     * 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 @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info(&logger, "---- Application Init ----");
    //  Click initialization.
    tester_cfg_setup( &cfg );
    TESTER_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    tester_init( &tester, &cfg );
}
void application_task ( )
{
    int i;
    for( i = 0; i < 12; i++ )
    {
        blink( pin_addr[ i ] );
    }
    all_on( );
    Delay_1sec( );
    all_off( );
}
int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }
    return 0;
}
// ------------------------------------------------------------------------ END


































