I am using PICKIT 4, PIC16F18446 microcontroller, and MPLAB X IDE. I am following an instruction provided from Microchip, Measuring frequency
Update:
I am not entirely sure what i needs to change but I am consistently getting an output of Frequency: 25536 whether there is an input signal or not. (Image of the output, and pin configuration shown below)
The Original Poster is using a PIC18 tutorial for a PIC16F target.
The MPLABX Code Configurator (MCC) tool is an awful thing for anyone new to the Microchip development tools to use.
An MPLABX project that does what I think this tutorial is about for the PIC16F18446 target is here in my git hub repository.
MCC was used to create most of this code so you should be able to see how it was done.
This code runs in the MPLABX simulator but that is a buggy hot mess. Use it with caution.
Related
The existing project is running well on STM32F0. The code should be converted to Atmel SAMD21.
The code is written in Visual Studio and using the IntelliSense configuration (ARM Paths). Both projects should use the I2C interface. The package which is used is ChibiOS for STM32.
Because I didn't write the code from scratch, Which part should I change in the code or read carefully? In other words, what is common and different in programming 2 different arms?
Do I need to do my own bootstrap (I mean the initialization part) and linker script? What else is needed?
Also, is there any configuration file for arm definition that I should change?
As I should change chibiOS and add the libraries for Atmel, Which library or package is better to use for Atmel SAMD?
Is there any idea or example that is helpful to compare between these
2 arms?
Much appreciated for any helpful suggestion, in advance.
I have been trying to open c files in the Arduino IDE (which some people claim is possible).
I have not been able to do so.
How can I program the Arduino in c given that I have a project/files in another IDE? (for example, MPLABX)
I am not sure what you are trying to archive. Is it that you want to open it via the Arduino IDE or also compile the source code?
I am not aware of programming in bare c in the Arduino IDE. But if you're looking into using real c code, it might be a good time start either compiling and uploading via terminal yourself, or use an IDE which is suited for development with micro controllers.
I think you can tell the Arduino IDE to more elaborately log outputs. This would tell you exactly the commands the IDE is using (uses avrdude). Then you can use an IDE/Editor of your choice for coding.
Otherwise, have a look at eg. Atmel Studio. They also support Arduino.
There are two answers in one:
If you really want to use the ArduinoIDE you have to have a basic *.ino file having at least the defines and includes which are in the project file and the reqiured setup() loop() usually whats in main in c goes to loop() in ArduinoIDE. Thats the stoney path because there are some specific issues coming from the philosophy behind ArduinoIDE (help makers with little (no?) programming skills to get started quickly).
If you just need the Arduino tool-chain and want to work more comfortable you have two other options:
EclipseIDE with the Sloeber add-on. Download the Sloeber-AllInOne-Package for an easy start and THEN add the other modules you need (like for web development or similar)
PlatformIO an IDE for micro controller development - there is also a cloud based version for testing around.
All mentioned tools are real open source and available cross PC platform and not a gift from a company like MS for probably later lockin of devs
I've decided to make the step up from using PIC to ARM Cortex-M but having trouble finding an equivalent to the PICKIT to program it.
After googling the net I have been given loads of options but have no idea what to buy.
Can anyone out there give me any advise on what to buy?
I'm so used to buying a PIC16F microcontroller, using MPLAB and the PICKIT 3 I'm unsure about what I need.
I like the ST-Nucleo and the slightly more complex ST Discovery. They are inexpensive (start at around $13), versions for just about all STM32 series, built-in ST-LINK debug pod, and have Arduino style header connectors.
You can program it using free or commercial IDE/compilers, mBed compilers, and even the Arduino IDE. You can start with using the free CubeMX graphical generator to generate initialization code.
So literally all you have to spend minimally is just a $13 kit and a USB cable to get started.
I want to use FreeRTOS for PIC32MX120F064H using MPLABX IDE. I tried a lot but couldn't find any simple LED blinking project for this specific microcontroller that I am using. I even tried demo projects given by FreeRTOS but they are for specific microcontrollers and doesn't work with my microcontroller. I only need the project structure (meaning what/how files to include) and a simple LED blinking demo. I know from the FreeRTOS site that we have to include task.c, queue.c and list.c as basic files but I tried everything but no luck. Please somebody help me with this.
The FreeRTOS.org site has a page describing how to convert a demo from one device in an MCU family to another device in the same family. Alternatively have the MPLAB Harmony tool create a FreeRTOS project for your chip.
I am using Keil uvison 5 Evaluation version. After Run/Stop the code in debug mode it shows 0% coverage for each function in my C project.
What steps need to be followed for getting the code coverage?
Unfortunately, common debuggers are unsuitable to trace code execution.
Tracing user code avaliable only with UlinkPro debugger (and also without real hardware - in Keil simulator).
More information: http://www2.keil.com/coresight/#etm