Search found 69 matches

by dannyf
Sat Aug 19, 2017 1:21 pm
Forum: Code snipplets
Topic: Waveform Generator (Two DAC examples)
Replies: 22
Views: 7325

Re: Waveform Generator (Two DAC examples)

Sawtooth waveform on both DAC channels code pieces like that are helpful in testing a concept but not that useful in real life, as the loop timing is generally not consistent from run to run. a much better approach is DDS: 1) create waveform in tables; 2) index the tables via a phase accumulator; 3...
by dannyf
Sat Aug 19, 2017 1:17 pm
Forum: General discussion
Topic: [SOLVED] is Arduino more efficient in RAM and Flash usage?
Replies: 2
Views: 194

Re: [SOLVED] Arduino is more efficient..?

why arduino memory usage is small than stmt32 ..? I have a live project that compiles to 3kb+ on a PIC24 and 0.7kb on a PIC12, identical code + functionality. a few things contribute to that disparity: 1) compiler / linker settings; the single biggest impact will come from trimming unused code. 2) ...
by dannyf
Tue Aug 15, 2017 6:34 pm
Forum: General discussion
Topic: Forum cluttered with posts about non existent problems...
Replies: 24
Views: 456

Re: Forum cluttered with posts about non existent problems...

The issues you are complaining about reflect the nature of the beast called arduino: it was designed by beginners for beginners . it draws (originally)non users in by lowering the huddle for them.

As such you get the kind of questions you typically don't get.

I see no fix to that.
by dannyf
Sat Aug 05, 2017 11:27 pm
Forum: Projects
Topic: hall effect tachometer
Replies: 14
Views: 332

Re: hall effect tachometer

have not found any code for the stm32duino using a hall effect sensor for measuring RPM, just code for the Arduinos. the two should be fairly easy to port to / from. basically, set up an isr that's called when the tachometer output changes state (or rising / falling). and calculate timing different...
by dannyf
Sun Jul 30, 2017 12:05 am
Forum: STM32F103 Boards
Topic: Blue pill current?
Replies: 7
Views: 266

Re: Blue pill current?

LF crystals generally have a hard time get it going on the f1.

The drive level is too low for some crystals. The price you pay for claiming low current consumption.
by dannyf
Mon Jul 24, 2017 10:27 pm
Forum: General discussion
Topic: Protecting Bootloader from being Corrupted
Replies: 8
Views: 246

Re: Protecting Bootloader from being Corrupted

It is not uncommon to lose firmware. Jlink v8 clones, based on stm32 as well, lose firmware regularly.

No one has been able to find a cure, short of upgrading to v9 (Lpc based) or the genuine article.
by dannyf
Thu Jul 20, 2017 10:10 am
Forum: STM8
Topic: STM8 Core
Replies: 34
Views: 1096

Re: STM8 Core

used the STM/COSMIC compiler as well. STVD is a dog, ugly as hell. there is an unlimited cosmic available on github. the morality of using it may be questionable to some, however. I use IAR. it is simple, intuitive and very utilitarian as well. the beauty of it is that you can use the same IDE acro...
by dannyf
Wed Jul 19, 2017 11:17 pm
Forum: Maple & Maple mini etc
Topic: Fading PB1 (D33) LED
Replies: 9
Views: 285

Re: Fading PB1 (D33) LED

I am asking if I can control it with PWM with AnalogWrite. you can check the datasheet to see if it is one of those output compare pins associated with a timer. if it is not, you may want to write two almost identical timer routines in which you flip the led pin. the two timer routines are identica...
by dannyf
Mon Jul 17, 2017 11:51 pm
Forum: Projects
Topic: Sine wave generator
Replies: 5
Views: 260

Re: Sine wave generator

Much easier to pick one with built-in DAC.
by dannyf
Thu Jul 13, 2017 10:01 am
Forum: General discussion
Topic: "Irregular" non-integer timer interrupt values (e.g. 22.67us/44.1khz)
Replies: 30
Views: 629

Re: "Irregular" non-integer timer interrupt values (e.g. 22.67us/44.1khz)

to reach the sample rate of 44.1khz. At the moment it works at 22 and 23 us rather than thinking about it from a time perspective,t hink about it from a frequency perspective: what frequency do you need the mcu to run at for you to hit that 44.1khz number with an integer dividor? then it becomes mu...