Getting Started With MPLAB® AI Coding Assistant

Last modified by Microchip on 2025/03/03 12:18

Downloading and Installing the MPLAB® AI Coding Assistant Extension

Before you begin, ensure you have downloaded Microsoft® Visual Studio® Code (VS Code®). If needed, you can download it here.

Download the MPLAB Extension pack from the VS Code Marketplace page for MPLAB Extensions. The MPLAB AI Coding Assistant is included in this extension pack.

Applying the API Key

Microchip will provide free access to Large Language Models (LLM) - the Microchip Chatbot.

Go to https://www.microchip.com/ai-assistant/accesskey/ to log in to myMicrochip and obtain your API Key.

If you are not signed inIf you are signed in
Sign in with your myMicrochip login credentialsYou will not be asked to sign in again

Sign In Screen

Back to Top


 A Terms and Conditions window will appear. Select I Agree.

Terms and Conditions

Back to Top


Select Copy Access Key underneath the unique key that has been generated for you.

Microchip Chatbot Access Key

Back to Top


Go back to VS Code and paste the key under Microchip API Key, then click Connect.

MPLAB AI Coding Assistant

You have now successfully installed the plugin. The chatbot will by default appear to the left and a quick tutorial on getting started will appear at the top.

Begin communicating with the chatbot - type in "Hello".

Back to Top

Enabling/Disabling Autocomplete

On the bottom leftmost corner of the window, you should see the Autocomplete icon:

Autocomplete

Back to Top


Enable or disable the feature by clicking on the Autocomplete icon and making the selection you want.

Back to Top

Common Features

Autocomplete

Receive inline code suggestions as you type. Click TAB to accept the suggestion.

Autocomplete gif

Back to Top

Chat

Ask Microchip-specific questions as you code from the sidebar without leaving the editor. Use CTRL+L to copy code into the chat window.

Chat gif

Back to Top

Datasheets

@datasheet

Chat with Microchip datasheets in your opened MPLAB project.

Datasheet gif

Back to Top

Folder

@folder

Query a specific folder. Before using this command, ensure that codebase indexing is complete.

Folder gif

Back to Top

Inline Edit

Use inline suggestions within code by using CTRL+I.

Inline Edit gif

Back to Top

Terminal

@terminal

Fix errors reported in the terminal.

Terminal gif

Back to Top

Codebase

@codebase

Query the entire codebase. Before using this command, ensure that codebase indexing is complete.

Codebase gif

Back to Top

Slash

Activate this shortcut by typing / and making your desired selection from the dropdown.

Slash Command gif

Back to Top

Troubleshooting

Invalid Microchip Chatbot Access Key

If an invalid key message appears, troubleshoot by ensuring the API key matches what you have copied.

Invalid key message

 Click on the Microchip Chatbot. A drop-down menu will appear.

Microchip Chatbot from drop-down

Back to Top


 Hover over the Microchip Chatbot to see a cog wheel. Click on the cog wheel to open a file called 'config.json'.​ Click on the cog wheel to open a file called 'config.json'

Back to Top


 Update the Chatbot with your unique API Key.

unique API Key example

Back to Top


 Save and close the file. Upon correct setup, you will be able to communicate with the Chatbot.

Chatbot communication

Back to Top