Search found 1788 matches

by mnfisher
Tue May 19, 2026 9:36 am
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

Might be pushing it...

There are alternative techniques. One is a custom interrupt handler (to reduce the ISR overhead) Faster still - move the input to D5 and use it as input for TMR1... Both need some C.

Signal integrity needs to be good too - and not degrade due to capacitance etc

Martin
by mnfisher
Mon May 18, 2026 9:57 pm
Forum: Projects - Embedded
Topic: Word lists - compression
Replies: 0
Views: 30

Word lists - compression

There are quite a few 'games' that use five letter word lists - Wordle being best known, but there are also Quordle and Octordle. The fun part is writing a compression for the text. Wordle actually uses two word lists - a longer one containing all valid words (14855 words - 74275 bytes) that the use...
by mnfisher
Mon May 18, 2026 9:36 pm
Forum: Bug Reports
Topic: Embed file - restrictions on file size
Replies: 0
Views: 29

Embed file - restrictions on file size

Just tried to use embed file - and hit a (serious) limitation.... I tried to include a 22k (binary) file - but this doesn't work. Looking at the source code (of the project and the component) - and it looks like the file is expanded to a 1000 character string. So at an average of two bytes per digit...
by mnfisher
Mon May 18, 2026 4:26 pm
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

Hi Viktor,

That sounds reasonable - glad you got it working...

As mentioned, using the 1s pulse from a ds3231 (or other RTC) makes the clock speed irrelevant - if you need more accuracy?

Martin
by mnfisher
Mon May 18, 2026 8:15 am
Forum: General
Topic: UCS2 (UTF-16BE) to text
Replies: 1
Views: 63

Re: UCS2 (UTF-16BE) to text

It should be straightforward to display - at least for the standard character set. UCS2 stores data as 16bits so allows 65536 characters - ASCII is 8 bit (32..127) as a subset. So one option is to just convert from 16bit to 8bit. This will depend on the byte order on the device but: .char = .ucs2 //...
by mnfisher
Sat May 16, 2026 1:54 pm
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

Hi Viktor, Timer0 isn't used - just TMR1 for the time interval and a pin change (I used d2). Yes - it would be better to use an average - i used the average component but removed to just leave the barebones. I also tried adding a count and just increasing count after 100 rising edges but it didn't g...
by mnfisher
Fri May 15, 2026 11:27 pm
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

I tried the above idea on hardware (although I used a Uno rather than a Nano) - and it performs pretty well... With a signal at 160kHz - it gives a frequency count of ~155900. The error might be caused by several issues - pin change interrupts occurring whilst the timer interrupt (or output) are mis...
by mnfisher
Fri May 15, 2026 7:53 am
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

The capture compare would use C. What code do you have - you can use a timed interval and isr? On phone at present - but Isr (pin change rising) Count = count + 1 Every second (this could be an interrupt - i think you can get a timer interrupt 0.96s (i call them bogosecs :roll: ) Frequency= count (a...
by mnfisher
Fri May 15, 2026 5:23 am
Forum: General
Topic: Freq meter err (FC11,Nano)
Replies: 10
Views: 284

Re: Freq meter err (FC11,Nano)

You can get reasonable accuracy - but it depends what you want. You'll need an accurate clock and there are limits to how fast you can measure. You can use the capture compare module of the MCU - there is a long discussion here https://flowcode.co.uk/forums/viewtopic.php?p=18024#p18024 for a PIC tha...
by mnfisher
Wed May 13, 2026 4:27 pm
Forum: Projects - Embedded
Topic: Mastermind (tm) - Pool reduction and Minimax algorithms
Replies: 15
Views: 666

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

I pulled the bit array to a new component - which I called bool_array. I think BitArray would probably be a better name - but for now it remains. I made it a bit more Flowcode - it simulates (though it would be a lot of single stepping!) - and it doesn't return a 'pointer' - it just uses an internal...