====== 0 Tools ====== ===== 0.1 SimulIDE ===== You can find the free electronics simulation program SimulIDE in [[https://ilias.hs-heilbronn.de/ilias.php?baseClass=ilrepositorygui&ref_id=22088|ILIAS]] under ''(DE/EN) Software''. \\ Alternatively, the program can also be downloaded from the [[https://simulide.com/p/downloads/|manufacturer's website]]. There, a "small contribution" must be entered, which can also be 0€. \\ \\ \\ In contrast to TINA TI, SimulIDE has a different focus and therefore the following advantages and disadvantages. Advantages: * Microcontrollers are simulated well (including Atmel chips). This is not possible in TINA TI. * The microcontrollers can also be programmed. This means that microcontroller-suitable source files ([[https://en.wikipedia.org/wiki/Intel_HEX|hex files]]) can be used. * Interaction between software and hardware is possible. Disadvantages: * Simulation of various electronic components is only implemented in a simplified way (e.g. operational amplifiers or FETs) * The software is still being heavily developed. This means it is a good idea to use the version specified above in order to avoid compatibility problems. To get started with SimulIDE, it helps to watch the [[https://www.youtube.com/watch?v=rwbQDoZ-9hQ&list=PL0YDA67EjDEE5hxtdwSvjL6qtLtfyK39W&ab_channel=SimulIDE|developer's playlist]]. ==== Tips for Using SimulIDE - Configuration ==== {{drawio>BildKonfig }} * If the text is displayed too small after opening the program, one of the following approaches may help: * In SimulIDE, after opening the program, click on the gear icon. Select the ''App'' tab. There, enter for example 2.0 for ''Font Scale'' and restart the program. * In Explorer: ''right-click >> Properties >> Compatibility >> Change high DPI settings >> Override high DPI scaling behavior >> check the box >> select "System"''. (if necessary, choose "System (Enhanced)") ====== 0.2 Microchip Studio ====== Microchip Studio is a programming environment for creating a microcontroller-suitable source file ([[https://en.wikipedia.org/wiki/Intel_HEX|hex file]]) from C or C++. ===== Installation ===== ===== Installation Guide ===== The current version of the program can be found on the [[https://www.microchip.com/en-us/development-tools-tools-and-software/microchip-studio-for-avr-and-sam-devices#Downloads|Microchip homepage]]. - If nothing happens after pressing the ''Download Microchip Studio'' button: simply scroll down to ''Downloads and Documents'' - With fast internet connections, the web installer can be chosen; with slower connections, the offline installer allows the entire package to be downloaded before installation. - During installation, only the "AVR" architecture is required. - "Advanced Software Framework and Example Projects" are not required. - Depending on the speed of the computer and the internet connection, installation takes about 5 minutes. - If it is not already installed, Visual Studio will also be installed during installation. - The question about licenses for the C compiler should be skipped with ''Next >'' - In addition, various device drivers may also be installed. These make it possible to write to the chips using a programming device. - Afterwards, open Microchip Studio directly so that you can make the first important settings. ===== for Mac Users ===== The following procedure is especially recommended for Mac users: - Open a browser. - Establish a VPN connection via eduVPN. - Go to [[https://fernzugriff-pools.hhn.hs-heilbronn.de|fernzugriff-pools.hhn.hs-heilbronn.de]] - Log in and select a computer. - Select Mr. Ziegler's image with "uC_PCB" (search for Ziegler) - Then it will take a little while, because the pool computer now starts the Windows image. - You can now access a PC with Microchip Studio through your browser. - Please note that all data is deleted after ending the session. \\ This means it is a good idea to set up the "U:" drive ("home directory"). Please contact Mr. Ziegler for this. ===== First Test of the Connection to the AVR-USB-Progi ===== Carry out the following steps to perform an initial test with the hardware. - Preparations - Connect the MiniMEXLE - to the Progi (black box) via ribbon cable - to the power outlet via charging cable with the barrel connector - Open Microchip Studio (for example by pressing the key, entering Microchip Studio, and pressing ). - Download the file {{microcontrollertechnik:5._menufuehrung.hex}}. - After opening the program, connect the Progi to the PC / laptop via USB cable. This step must be done before the following ones! - The green LED for USB communication should light up on the Progi. - Enter USB connection - Without creating a project, go directly to ''Tools >> Add Target..''. - In the displayed window, you should select ''STK500'' as the tool in the dropdown menu, which was previously empty. - For the selection of the "Serial Ports", choose the first available one, e.g. ''COM3'', and confirm the selection with ''Apply''. \\ If no port is shown here, check whether the connection to the USB-Progi was successful. \\ If the green LED is lit and the USB cable is connected correctly, refer to the instructions under 4.d. - First connection attempt - Select ''Tools >> Device Programming'' in the menu. - Under Tools, select the corresponding USB connection, e.g. ''STK500 COM3''. - Under Device, you must select ''ATmega88''; you can enter ''88'' and then click the correct value in the dropdown menu. - Under Interface, ISP should now be shown. - Now press ''Apply''. - In case of error: - If it takes longer after pressing ''Apply'', the connection did not work. An error message ''Unable to connect tool STK500 (COMx)'' will then be displayed. - You can acknowledge the error message, but after that it takes a few more seconds until the program responds correctly again. - Then close the ''Device Programming'' window. Go back to point 2 in this guide and try the next serial port. \\ Remember the number of the port, as this is needed under 3.b. - If all available COM ports have been tested, or none were displayed from the beginning, installing a Virtual COM Port Driver may help. One can be found at [[https://ftdichip.com/drivers/vcp-drivers/|FTDI]]. - If it works: - You should now see a bit more in the ''Device Programming'' window. - Before the next steps, connect the MiniMEXLE (= board with display and buttons) to the Progi with the ribbon cable and to the power supply with the barrel connector. Also plug the power supply into an outlet. - Now press ''Read'' at the top next to ''Device Signature''. - A hexadecimal number ''0x....'' should appear. Your computer can now establish a connection to the MiniMEXLE for flashing. - In the ''Device Programming'' window, go to ''Memories''. Under ''Flash'', insert the path to the downloaded file ''5._menufuehrung.hex''. You can also select the path using the ''...'' button to the right. - Press ''Program'' - The MiniMEXLE should now display \\ '' - Experiment 5 -'' \\ ''Program Menu'' \\ and then \\ '' Main Level'' \\ ''P1 P2 P3 P4'' - This means you have successfully tested the connection and the flashing process ===== Important Settings ===== * Use the **display of line numbers**: ''Tools >> Options >> Text Editor >> All languages >> General >> Line numbers'' * As soon as you work on the first project: Make sure to disable compiler optimization. This can be done with the following steps: * Menu ''Project >> Properties... >> AVR/GNU Compiler >> Optimization'' * The optimization level should be set to ''None (-O0)'' * I recommend using ATMEL Studio in English. This makes the instructions in this course easier to follow correctly. If you accidentally selected German (e.g. during installation), you can correct it under ''Tools >> Options >> environment >> international settings >> Language''. ===== Tips ===== * If the **Solution Explorer** (display of the files in the project) is not present on the right-hand side, you can find it under \\ ''View >> Solution Explorer'' (''++'') {{page>microcontrollertechnik:tipps_fuer_die_fehlersuche#haeufige_fehler&nofooter}} ====== 0.3 MEXLE GitLab ====== {{page>gitlab_installation&noheader&nofooter}}