Search found 1733 matches
- Sat Apr 11, 2026 8:26 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 7
- Views: 100
Re: ToBinary string manipulation
Hi Bob, Looks like a neat solution - reduces transmission time by 50%. It's a good optimisation. I'll have a play at putting it into a component - if you don't use a function the compiler will optimise it away (at least when it's compiled, I'm not sure what the situation with web apps is) - or as an...
- Sat Apr 11, 2026 6:00 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 7
- Views: 100
Re: ToBinary string manipulation
I added a binary string (in the form "101010101" with upto 32 characters) to value function too. In simulation I've added the various variables to the viewer so that you can compare them (ie check they are correct :-) ) Note that it doesn't check the validity of the string (so "10ABC&...
- Sat Apr 11, 2026 5:17 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 7
- Views: 100
Re: ToBinary string manipulation
Pseudocode is just a way to describe an algorithm. Although FC can display code as (a) pseudocode too. I converted ToBinary to FC - and tested in s8imulation. Here I just pass constants to the macro - although variables could also be used as the arguments. If we added a BinaryToValue - that takes a ...
- Sat Apr 11, 2026 1:38 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 7
- Views: 100
Re: ToBinary string manipulation
Adding a ToBinary function is an interesting programming exercise: In effect you need (in pseudocode here): ToBinary(long unsigned x, byte digits) return string// Take a number (up to 32 bits) and convert to a string locals byte i = 0, string res[33] loop while .i < .digits res[.i] = ((.x & (1 <...
- Thu Apr 09, 2026 1:43 pm
- Forum: Feature Requests
- Topic: Web app spinner
- Replies: 6
- Views: 232
- Thu Apr 09, 2026 10:08 am
- Forum: Feature Requests
- Topic: Web app spinner
- Replies: 6
- Views: 232
Re: Web app spinner
The 7-segment display is fairly easy to implement too - if you can write the data to the display register. Just need to calculate a 'character set' (for example for a rotating star) and then output at intervals. For real fireworks - there is the 16 segment display :-) (Though the one I did didn't wo...
- Wed Apr 08, 2026 9:23 pm
- Forum: General
- Topic: EB-006 drivers
- Replies: 3
- Views: 368
Re: EB-006 drivers
Have you tried Zadig (with libusb-win32)
It's available from https://zadig.akeo.ie/
I've used it several times in the past - and it seems safe and reliable.. Usual provisos apply though.
Martin
It's available from https://zadig.akeo.ie/
I've used it several times in the past - and it seems safe and reliable.. Usual provisos apply though.
Martin
- Wed Apr 08, 2026 8:51 am
- Forum: General
- Topic: Parity bit
- Replies: 4
- Views: 239
Re: Parity bit
Rather than using an if .... statement to calculate the parity bit (and brackets might change the result here if (.x == 1) || (.x == 3) etc (you have if x==1 && x= 3 && x=5... which can't ever be true) Depending on whether you need odd or even parity: Use .parity = .x & 1 Returns...
- Wed Apr 08, 2026 6:49 am
- Forum: General
- Topic: Parity bit
- Replies: 4
- Views: 239
Re: Parity bit
I would probably count the bits in both MSB and LSB. If a byte (LSB or MSB) is 0 - it won't affect the parity value - but if there is an error in transmission then it might not be 0 - and will affect the final result (if you use (MSB << 8) + LSB) Alternatively - if LSB must be 0 - ignore it - and us...
- Wed Apr 08, 2026 6:33 am
- Forum: General
- Topic: MCP320x 16-bit to Nano
- Replies: 12
- Views: 708
Re: MCP320x 16-bit to Nano
No I didn't use SPI here...
Just bit-bang the pins....
Martin
Just bit-bang the pins....
Martin