microcontroller

Java in Embedded Programming

本秂侑毒 提交于 2019-12-05 13:43:44
Can java programming be used in micro-controller programming like C and C++? If yes what are the requirement for it? What about in PIC16 and PIC32 series micro controller? Any Possibility for them. I could not find much more information about it in the web too.I appreciate your help. Cheers!!! Clifford To run Java on any platform you will need a Java Virtual Machine (JVM). I would not hold out too much hope for PIC16 due to the memory resources required and perhaps the performance. If you want the highest performance and smallest footprint then C or C++ are a better (and most usual) solution

Why 24 bits registers?

半世苍凉 提交于 2019-12-05 09:55:31
In my work I deal with different micro-controllers, micro-processors and DSP processors. Many of them have 24-bits registers and counters. I know how to use them, this is not my question. My question is why do they have 24-bits register! why not make it 32 bit? and as I know, it is not a problem of size, because the registers are already 32bits, but have maximum of 0xFFFFFF. Do this provide easier HW implementation? Faster calculations? Or it is just "hmmm, lets put 24-bits registers to make the job of programmers more hard"? My guess is that most DSP applications simply don't need 32-bits.

Connect to SQL Server from Microcontroller (Arduino or Fez with .Net Micro Framework)

旧时模样 提交于 2019-12-05 08:55:30
I'm looking for examples, tutorials, or just "this+this+this should work" for reading from and writing to a SQL server (2008) from a microcontroller such as the Arduino board. I've also looked at (and will probably go with) devices with the .Net Micro Framework such as the Fez Cobra . The Micro Framework does not include ADO. I'm sure this is going to involve some XML, but I can't figure out which technology to further investigate. I do not want to have an PC application to serve as a go-between. Thanks! Honestly, I would make a thin service that would sit in-front of your database and use

Building a two-part firmware image using GCC toolchain

梦想与她 提交于 2019-12-05 07:21:39
I have some firmware built with GCC that runs on an ARM Cortex M0 based microcontroller. The build currently generates a single binary image that can be written into the program memory of the microcontroller. For reasons to do with field update, I need to split this image into two parts that can be updated separately. I'll call these Core and App . Core : contains the interrupt vector table, main() routine, and various drivers and library routines. It will be located in the first half of the program memory. App : contains application-specific code. It will be located in the second half of the

What is the lowest latency communication method between a computer and a microcontroller?

放肆的年华 提交于 2019-12-05 04:10:24
问题 I have a project in which I need to have the lowest latency possible (in the 1-100 microseconds range at best) for a communication between a computer (Windows + Linux + MacOSX) and a microcontroller (arduino or stm32 or anything). I stress that not only it has to be fast, but with low latency (for example a fast communication to the moon will have a low latency). For the moment the methods I have tried are serial over USB or HID packets over USB. I get results around a little less than a

How do I generate random numbers in a microcontroller efficiently?

廉价感情. 提交于 2019-12-04 19:45:12
问题 How do I generate random numbers in a microcontroller efficiently? Are there any general guidelines or a particular fast method? 回答1: You can generate pseudorandom numbers by manipulation of bits by simulating a LINEAR FEEDBACK SHIFT REGISTER The question then becomes 'how many bits do you want to simulate?' Wikipedia has some information. 回答2: One normally generates pseudo-random numbers and not actual random numbers, although both are possible at varying rates. There are two general

How to set STM32 to generate standard CRC32

自闭症网瘾萝莉.ら 提交于 2019-12-04 18:15:08
问题 I am trying to generate CRC with STM32L4 hardware modul. I would like to validate fatfs files so basically I have byte arrays. I am using this CRC generator. Unfortunately I cannot figure out how to set STM32L4 to generate the same result. I need CRC32 and I have configuration: hcrc.Instance = CRC; /* The default polynomial is not used. It is required to defined it in CrcHandle.Init.GeneratingPolynomial*/ hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_DISABLE; /* Set the value of the

What are traps?

怎甘沉沦 提交于 2019-12-04 16:26:22
问题 There are many different types of traps listed in processor datasheets, e.g. BusFault, MemManage Fault, Usage Fault and Address Error. What is their purpose? How can they be utilized in fault handling? 回答1: Traps are essentially subroutine calls that are forced by the processor when it detects something unusual in your stream of instructions. (Some processors make them into interrupts, but that's mostly just pushing more context onto the stack; this gets more interesting if the trap includes

Do interrupts interrupt other interrupts on Arduino?

别等时光非礼了梦想. 提交于 2019-12-04 15:35:28
问题 I have an Arduino Uno (awesome little device!). It has two interrupts; let's call them 0 and 1 . I attach a handler to interrupt 0 and a different one to interrupt 1, using attachInterrupt() : http://www.arduino.cc/en/Reference/AttachInterrupt. Interrupt 0 is triggered and it calls its handler, which does some number crunching. If interrupt 0 's handler is still executing when interrupt 1 is triggered, what will happen? Will interrupt 1 interrupt interrupt 0 , or will interrupt 1 wait until

Using a rotary encoder with AVR Micro controller

不打扰是莪最后的温柔 提交于 2019-12-04 13:05:05
问题 I'm having trouble getting a rotary encoder to work properly with AVR micro controllers. The encoder is a mechanical ALPS encoder, and I'm using Atmega168. Clarification I have tried using an External Interrupt to listen to the pins, but it seems like it is too slow. When Pin A goes high, the interrupt procedure starts and then checks if Pin B is high. The idea is that if Pin B is high the moment Pin A went high, then it is rotating counter clock-wise. If Pin B is low, then it is rotating