CANPico v2 with Pico WH Pre-installed

SKU: SKP-0009-WH
EAN / Barcode:
Lieferfrist: Sofort versandfertig, Lieferfrist 1-2 Tage

Preis:
Angebotspreis69,59 €

Inkl. Steuern Versand wird an der Kasse berechnet

Lager:
Auf Lager

Beschreibung

Das quelloffene MicroPython-SDK von Canis Labs bietet eine ausgefeilte CAN-API, einschließlich prioritätsinversionsfreier Treiber, Zeitstempel mit einer Genauigkeit von 1 μs, große Puffer und eine API zur Triggerung eines Logikanalysators oder Oszilloskops. Außerdem gibt es Unterstützung für die Kommunikation mit einem Host-Gerät über USB (über das MIN-Protokoll), um Anwendungen wie Bus-Logging oder sogar die Verwendung eines CANPico als PC-CAN-Schnittstelle zu ermöglichen. Das SDK enthält auch das CANHack-Toolkit für Low-Level-Fehlerinjektion. Mit dem SDK kann Python-Code auf dem Dual-Core RP2040-Mikrocontroller des Raspberry Pi Pico ausgeführt werden und in Echtzeit auf den CAN-Verkehr reagieren, wobei die Zeiten in Mikrosekunden statt in Millisekunden gemessen werden, was das Gerät zu einer hervorragenden Plattform für Hardware-in-the-Loop-Tests und Emulationen macht.

Hauptmerkmale der Hardware

  • Microchip MCP251863T CAN-Steuerung
  • Schraubklemme für direkten Zugang zur CAN-High/Low-Twisted-Pair-Verdrahtung und einem gemeinsamen Massebezug
  • Steckbrücke für einen standardmäßigen 120Ω-CAN-Busabschlusswiderstand
  • Jumper zum Aktivieren und Deaktivieren des Sendeeingangs für den Transceiver

Schnittstellen

  • Stiftleisten für den Zugriff eines Logikanalysators auf die digitalen CAN-Signale (TX- und RX-Pins des Transceivers)
  • Stiftleisten für den Zugriff des Oszilloskops auf die analogen CAN-Signale (CAN High/Low, Masse)
  • TRIG-Pin für Logikanalysator- und Oszilloskop-Triggerung auf programmierbare CAN-Ereignisse
  • Direkter GPIO-Zugriff auf CAN RX- und TX-Pins für Software-Fehlerinjektion
  • GPIO-Steuerung über Transceiver im Low-Power-Standby-Modus

Der Raspberry Pi Pico ist so konzipiert, dass er mit Hilfe der "Halbmond"-Kanten auf eine Platine gelötet werden kann, so dass die Header-Pins frei bleiben. Die anderen Anschlüsse sind USB (für die Stromversorgung und die Verbindung zu einem Host) und der CAN-Bus. Die 6-polige Stiftleiste ist für einen Logik-Analysator und ein Oszilloskop vorgesehen, um CAN-Rohsignale zu sehen, der gelbe Jumper dient zum Aktivieren des Abschlusswiderstandes, und der blaue Jumper ermöglicht die Übertragung auf dem Bus (wenn dieser entfernt wird, ist das Board darauf beschränkt, den CAN-Bus nur abzuhören, eine nützliche Sicherheitsfunktion).

Software-Unterstützung

Die Softwareunterstützung erfolgt mit einem MicroPython SDK, das die folgenden APIs enthält:

  • CAN-API
  • CANHack-Toolkit-API
  • Trigger API zum Auslösen von Testinstrumenten bei CAN-Fehlern und CAN-Frames mit einer bestimmten ID und Nutzlast
  • MIN API zur Kommunikation mit einem Host-PC über eine zweite virtuelle serielle USB-Schnittstelle

Die CAN-API besteht aus den folgenden Python-Klassen:

  • Die CAN-Klasse ermöglicht die Steuerung und den Status des CAN-Controllers
  • Die CANFrame Klasse kapselt CAN-Frames, die entweder in Software erstellt oder von der Hardware des CAN-Controllers empfangen werden
  • Die CANError-Klasse kapselt CAN-Fehler-Frames, die beim Empfang von der CAN-Controller-Hardware erzeugt werden
  • Die CANID-Klasse beschreibt eine CAN-ID: jeder CAN-Frame hat eine CAN-ID, aber viele Frames können die gleiche ID haben
  • Die CANIDFilter-Klasse beschreibt, wie ein CAN-Controller CAN-Frames auf der Grundlage ihrer CAN-ID identifizieren und akzeptieren sollte

Die MIN-API bietet MIN-Protokollunterstützung für eine zuverlässige Kommunikation mit einem Host-PC. Einige der CAN-API-Aufrufe verwenden eine binäre Darstellung, damit Elemente über MIN übertragen werden können.

Ressourcen

  • Das Hardware-Referenzhandbuch (PDF) für das CANPico-Board (Version 01, Ausgabedatum 2021-04-29, 8 Seiten) mit Schaltplänen.
  • Das MicroPython SDK Referenzhandbuch (PDF) für das CANPico Board (Version 01, Ausgabedatum 2021-04-29, 32 Seiten). Dokumentiert sowohl die MicroPython CAN API als auch die CANHack API.
  • Die aktuelle Firmware (.uf2, Ausgabedatum 2023-03-09). Basiert auf der Version v1.15 von MicroPython für den Pico. Der Quellcode ist als Patch-Datei für diese MicroPython-Version freigegeben (siehe README.txt für Details).
  • Der aktuelle Schaltplan (PDF) und das Kicad-Design (.kicad_pcb) für das CANPico-Board.
  • Die canpico.py-Beispiele für das CANPico-Board (die Thonny-IDE kann verwendet werden, um die Datei in das Pico-Dateisystem zu laden)
  • Es gibt einen Blog-Beitrag zur Einführung in CANHack und ein Demonstrationsvideo (beachten Sie, dass beide die CANHack MicroPython API verwenden, allerdings auf dem STM32-basierten PyBoard und nicht auf dem Raspberry Pi Pico).

    English description 

    The open source MicroPython SDK from Canis Labs provides a sophisticated CAN API, including priority-inversion free drivers, 1μs accuracy timestamps, large buffers and an API for triggering a logic analyzer or oscilloscope. And there is support for communicating to a host device over USB (via the MIN protocol) to enable applications like bus logging or even using a CANPico as a PC CAN interface. The SDK also includes the CANHack toolkit for low-level error injection. The SDK lets Python code run on the dual-core RP2040 microcontroller of the Raspberry Pi Pico and respond in real-time to CAN traffic with times measured in microseconds rather than milliseconds, making it a great platform for hardware-in-the-loop test and emulation.

    Main hardware features

    • Microchip MCP251863T CAN controller
    • Screw terminal for direct access to CAN High/Low twisted pair wiring and a common ground reference
    • Jumper for a standard 120Ω CAN bus termination resistor
    • Jumper for enabling and disabling transmit input to the transceiver

    Interfacing

    • Header pins for logic analyzer access to digital CAN signals (TX and RX pins of the transceiver)
    • Header pins for oscilloscope access to the analog CAN signals (CAN High/Low, ground)
    • TRIG pin for logic analyzer and oscilloscope triggering on programmable CAN events
    • Direct GPIO access to CAN RX and TX pins for software error injection
    • GPIO control over transceiver low power standby

    The Raspberry Pi Pico is designed to be soldered on to a board using the ‘half moon’ edges, leaving header pins free. The other connections are USB (for power and connectivity to a host) and the CAN bus. The 6-pin header is intended for a logic analyzer and oscilloscope to see raw CAN signals, the yellow jumper is for enabling the termination resistor, and the blue jumper enables transmission on the bus (if this is removed then the board is restricted to only listening to the CAN bus, a useful security feature).

    Software support

    The software support is provided with a MicroPython SDK that has the following APIs:

    • CAN API
    • CANHack toolkit API
    • Trigger API for triggering test instruments on CAN errors and CAN frames with a specified ID and payload
    • MIN API to communicate with a host PC over a second virtual USB serial port

    The CAN API consists of the following Python classes:

    • The CAN class provides control and status of the CAN controller
    • The CANFrame class encapsulates CAN frames, which are either created in software or by receiving them from the CAN controller hardware
    • The CANError class encapsulates CAN error frames, which are created receiving them from the CAN controller hardware
    • The CANID class describes a CAN ID: every CAN frame has a CAN ID, but many frames can have the same ID
    • The CANIDFilter class describes how a CAN controller should identify and accept CAN frames based on their CAN ID

    The MIN API provides MIN protocol support for reliable communication with a host PC. Some of the CAN API calls use a binary representation to allow items to be carried over MIN.

    Resources

    • The Hardware Reference Manual (PDF) for the CANPico board (version 01, issue date 2021-04-29, 8 pages) including schematics.
    • The MicroPython SDK Reference Manual (PDF) for the CANPico board (version 01, issue date 2021-04-29, 32 pages). Documents both the MicroPython CAN API and CANHack API.
    • The latest firmware (.uf2, release date 2023-03-09). Based on the v1.15 release of MicroPython for the Pico. The source code is released as a patch file for this MicroPython version (see README.txt for details).
    • The latest schematics (PDF) and Kicad design (.kicad_pcb) for the CANPico board.
    • The canpico.py examples for the CANPico board (the Thonny IDE can be used to put the file on to the Pico file system)
    • There is a blog post introducing CANHack and a demonstration video (Note that these both use the CANHack MicroPython API but on the STM32-based PyBoard rather than the Raspberry Pi Pico).

      Benötigen Sie Beratung oder ein Angebot zu diesem Artikel?

      Customer Reviews

      Be the first to write a review
      0%
      (0)
      0%
      (0)
      0%
      (0)
      0%
      (0)
      0%
      (0)

      Zuletzt gesehen