Zoltan Kocsi (@Kocsonya)
"I managed to get it working and I measured the time it takes for the
writing instructions. In my case is around 3-4 us, but after every 128
writing instructions,...
Mechanical buttons tend to bounce, which means that when you press or release them, it is not a single transition from one state to the other, but a series of transitions...
I don't know why you find it scary, really. They give you the equation for calculating the baud rate, which is pretty simple, for the baud rate is PCLK divided by...
I don't want to sound negative, but I think it's not going to be easy, to say the least. You need to cater for too many situations. Simple thing: on some systems...
Well, you need to look at the data sheets. If your hub is unpowered, then all power is supplied by the USB port on your board. It then has to power the 3 USB peripherals...
I don't know the answer to your second question, but for the first it won't be different. Linux handles the hub internally and you don't have to do anything with...
The question is, how much SW background you have, and how familiar you are with Linux. If by not having much experience with processors and micros you mean you...
Linux is Linux, all those different names are more about the build system than the kernel and the user code. You want to run some application code on your gizmo....
There are other caveats with bitfields too. Obviously you declare every HW register as volatile. Volatile bitfield operations, however, require (by the C standard)...
Yes, you can do it and there is no need to rotate the register, it is enough to shift the replacement byte. Say, you want to set the most significant byte:new_word...
If it's a differential microphone, why not connect it to the OPA as a differential signal? You can then use the OPA to set an arbitrary standby output voltage (e.g....
I think you will need to give us more. So far, you said "I built something. Turned on, didn't work. I tweaked it, and it still doesn't work. Tell me what's wrong.".Give...
As these chips communicate using fixed 16-bit long SPI messages, if you daisy chain three of them, you need a 6 byte buffer. If you use separate transmit and receive...
Well, there were comments about -1 possibly causing problems with signed/unsigned and so on. But you don't need -1, any value that is outside of the valid value...
At least in C and derived languages the && operator is specified to stop evaluating as soon as the first condition is false and similarly, the || operator...
Apart from what everyone else said, they might be looking for experience in different fields. If you've worked with 8 bitters, then you probably keep data sizes...
Usuallylinkers use object files in their entirety. If you want selective linking, split myFunc.c into the separate functions, myFunc1.c, myFunc2.c and so on, compile...
If you sample by 6kHz, then your sample rate actually is an integer multiple of both 50Hz (6000/50=120) and 60Hz (6000/60=100).The mains frequency is usually changing...
Considering that SPI needs 4 signals plus ground, a 40-lane flat cable is not a very likely choice. Even if every second lane is GND, and a few used to deliver power,...
There's a quite interesting book on the subject. It's old, but still, every bit of it still stands. It's "Peopleware" by Timothy Lister & Tom DeMarco. It is...
Well, ARM has many instruction sets. There was the original 32-bit ARM ISA. Then, for embedded systems they came up with a more code-space efficient limited subset,...
While I agree that learning a 32-bit uC coming from an 8-bit background might be steep, it's not really the core that makes it hard. It's just what surrounds it....
MIPI DSI is a specification to delivers video (and configuration) data with high-speed differential signalling. I doubt that an 8-bit PIC could do it. An ARM based...
As it was said before, you need to work out a power budget. Random charging is not necessarily a battery killer. What you need to consider, though, is that batteries...
For a scientific project I'd need a linear polariser where I can control the polarisation angle on a pixel by pixel basis.My idea is to use an LCD, with only one...
Well, I think you can call it a state machine, if you really want, but it's a bit of a stretch. It's a state machine as much as thisfor ( int i = 0 ;; i = ( i +...
I would look into the driver source code. 16000 is a very human number, not a computer one. So it is unlikely that it is bits being chopped off or anything like...
The other way around, extern const. The order is important; if you use const extern the compiler will complain. The keywords extern, register, static and auto are...
Well, the const keyword is a bit of a misleading thing. If you read the C standard it turns out that the const keyword means the following, not more, not less:"I...
Two comments, apart from the 'extern' business that "hodgec" has already told you.1. You are wasting space. You store 1 bit in one byte. You could store all the...
I mean, you don't need to do anything.The peripherals don't share pins. Each pin can be used by one and only one peripheral at the time, including the GPIO. When...
If the I2C is done by an I2C module on the chip, then you need to do nothing. The granularity of the GPIO is indeed port-width. However, when a pin is assigned...
Well, your example contains these:(uint32_t) (red << 16)where red is int. What you told the compiler was 'shift the signed int red by 16 bits then convert...
no wht m sayn iz that when the chip wakes up u shud set pll and pincon and pindir and all aftr PCON=2 instead of ISR cos thats where execution will continue after...
The power-down mode does not call the IRQ handler when it wakes up, in fact interrupts can be disabled both on the CPU and the VIC. You need to enable the wake up...
Yes, you are right. UB cannot be warned against enough times.There is implementation defined behaviour, which is something that the standard leaves to the compiler...
> ISO/POSIX C at least guarantees a char is 8 bits todayWell, I wouldn't be that sure of that:An object declared as type char is large enough to store any member...
That should not be the case. The C standard says that the result of an integer division must be "the algebraic quotient with any fractional part discarded" and...
The answer is the C standard...Char can be signed or unsigned, depending on the compiler. You can force it either way by declaring the variable signed char or unsigned...
Depends on the chip. First, the bus width is one thing, but the internal architecture is an other. Back in the old days the 8088 was pretty much an 8086 with an...
It is up to the compiler to name your variables any way it likes. As long as it is doing it in a consistent manner, the same compiler generated name will refer to...
As beningjw said. Forget the 8-bit chips. The ARM core based 32 bits chips can be sent to really low power consumption mode and they are just so much simpler to...
It does not depend on the microcontroller. The USB controller on the chip gives you the physical transfer capability, everything above that is your firmware. The...
I'm not familiar with this particular chip, nor with the cubemx framework, but I often work with other STM32 chips On those, to configure the RTC (and some of the...
Take a look at either uuencode or base64. They both transform a 3-byte (i.e. 24-bit) block to 4 bytes where all 4 bytes are printable ASCII characters.uuencode has...
Yes, you are completely correct.A lot of people does not seem to know how positively evil the C standard is regarding undefined behaviour.Undefined behaviour basically...
Do you have one or more spare port pin(s) to which you can put a scope?You could toggle them every time you enter and leave the ISR and also every time you enter...
A possible issue is that in your ISR you have the following:ISR()
{
if ( ( IRQ_source_reg & 0x0e ) == 0x04 ) {
process_receive_char;...
Take a look at the FT81x chips from FTDI (more precisely, the FTDI spin-off Bridgetek). They are quite interesting.The chip does not have a frame buffer, but it...
For a simple AVR micro that you possibly just use for hobby projects you probably don't need a bootloader. Burn the chip and that's it.But if you develop a system...
1. Check the power, the state of the reset pin and as @hodgec pointed out, the state of the ISP pin.2. If it's all good, check that your code is actually running....
Driving the wire on its own is not a major issue. Of course you need proper impedance matching termination at both ends. You will have a limited data rate; maybe...
As mr_bandit suggested, a scope would definitely help.An other thing that you might consider is to check whether after StartConversion() the SPI becomes busy or...
PDF is a bit more complex than HTML. PDF has its roots in PostScript. PS is a full-blown stack based language, Turing complete an all. That is very cool, because...
Forget the distro for a second.The way Linux (and any unix system) boots is, roughly, the following:Bootloader gets loaded and startsIt loads the kernel and a very...
Software interrupt is an interrupt triggered by software. That is, the ISR is started not because some hardware requests a service but because you execute a special...
Well, for starters, when the RF module is powered down, you will receive a constant 0, which is a break condition. When you turn the power on, first the RF module's...
Most MOS FETs do not need 10+ V to do anything. In fact, many can be killed with that kind of gate voltage. There are many which fully open at less than 2.5V, some...
If I understand your circuit correctly, you use the transistor to short the power for the radio module and hope that you can find a resistor value for R2 that is...
I can only repeat my suggestion: try to make your SD work with the SSP using interrupts. Until that works, forget the DMA. You will need to understand the SSP in...
The 23xx series chips use the ARM DMA macroblock, which is notoriously hard to set up properly. In addition, you need to set up the SSP correctly, which, by the...
If your MCU runs at 22MHz, then you can't generate an output faster than 11MHz. The 74HC595 at 4.5V has a maximum clock frequency of 25MHz, so there's no problem...
Before the IRQ hits, you have a stack that looks like this:SP->
local data of the called function
saved registers
return address (and possibly a frame...
"THERE IS ONLY ONE STACK"I beg to differ.Even on very old CPUs, like the m68k you mentioned, there were two stack pointers, the USP and the SSP (user and supervisor...
"So -the first byte from the slave is trash."Not necessarily. Some slaves put a status byte into the data register at the falling edge of the slave select. That's...
I believe (but not sure, never been a Windows person) early Windows versions were co-operative as well. I mean before W95, like 3.x and earlier. When I saw Win 1.0...
Well, the Commodore Amiga had a pre-emptive kernel, but bad applications still ended in Guru Meditation, as there was no memory protection. You could not hog the...
Use this form to contact Kocsonya
Before you can contact a member of the *Related Sites:
- You must be logged in (register here)
- You must confirm you email address