microcontroller

How do you use CMSIS without an IDE?

二次信任 提交于 2021-02-10 12:15:47
问题 I am working with STM32F103C8T6 and would like to use CMSIS, which is essentially just register definitions and no code, to make my life easier while still staying at a low level. The problem is that I have no idea how to install the library for use on the command line with Makefile. All documentation seems to be bound with a vendor-specific IDE like STM32CubeIDE. I suppose the first thing to do is to download the CMSIS library, which I found on GitHub. However, after unzipping ARM.CMSIS.5.6

How can I write a JavaScript compiler for Arduino or similar microcontroller? [closed]

烂漫一生 提交于 2021-02-07 03:57:41
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Improve this question I realize that this question will raise some eyebrows, and I realize that JavaScript is traditionally an interpreted language, please let me explain: I am software engineer specializing in web applications (.NET stack specifically). As a hobby, I enjoy

How can I exit my lookup table instruction with the desired value on PIC16F1829

不想你离开。 提交于 2021-01-29 08:19:34
问题 How can I get my code to work correctly when I include ADC conversion in it? I have a working code that displays two digits on 2 LED displays using a p16f1829. However, a problem arises when I try to include a code block that collects the results of an ADC conversion to display on the LED display (see below). A2D: ; Start the ADC NOP ; Requried ADC delay of 8uS => (1/(Fosc/4)) = (1/(500KHz/4)) = 8uS BANKSEL ADCON0 ; Selects memory bank containing ADCON0 register BSF ADCON0, GO ; Start the ADC

16PIC877A Reset with C code

夙愿已清 提交于 2021-01-29 03:06:14
问题 I am using PIC16F877a and I need program reset without using button. When I looked at datasheet and referance designs, there is a button on MLCR pin. If button was pushed, MCU was reset. But I need reset that can control with C code, I don't want to use reset button. Is there another way to do it? 回答1: PIC 8-bit MCUS have a software reset assembly instruction: RESET http://microchip.wikidot.com/8bit:rst You will have to use inline assembly. I've never used inline assembly for a PIC, but from

Receiving a string through UART in STM32F4

萝らか妹 提交于 2021-01-28 12:33:54
问题 I've written this code to receive a series of char variable through USART6 and have them stored in a string. But the problem is first received value is just a junk! Any help would be appreciated in advance. while(1) { //memset(RxBuffer, 0, sizeof(RxBuffer)); i = 0; requestRead(&dt, 1); RxBuffer[i++] = dt; while (i < 11) { requestRead(&dt, 1); RxBuffer[i++] = dt; HAL_Delay(5); } function prototype static void requestRead(char *buffer, uint16_t length) { while (HAL_UART_Receive_IT(&huart6,

Embedded System: Memory Layout when using Assembly Language

若如初见. 提交于 2020-12-12 05:38:59
问题 From my understanding, an embedded system runs machine code. There are multiple ways to generate this code. One is to write a programm in a higher level language like C and use a compiler to get such code. An other way is writing instructions in the assambly language for that embedded system and using an assembler to translate that to machine code. Now we got machine code which is loaded to the system and executed. The programm code is stored in non-volatile memory. Now, if the programm code

Embedded System: Memory Layout when using Assembly Language

倾然丶 夕夏残阳落幕 提交于 2020-12-12 05:38:04
问题 From my understanding, an embedded system runs machine code. There are multiple ways to generate this code. One is to write a programm in a higher level language like C and use a compiler to get such code. An other way is writing instructions in the assambly language for that embedded system and using an assembler to translate that to machine code. Now we got machine code which is loaded to the system and executed. The programm code is stored in non-volatile memory. Now, if the programm code