Search found 1013 matches

by mnf
Wed Sep 25, 2019 5:30 pm
Forum: Flowcode V8
Topic: BL0032 windspeed
Replies: 45
Views: 32950

Re: BL0032 windspeed

I did a simple frequency counter example here: https://www.matrixtsl.com/mmforums/viewtopic.php?f=26&t=20970&hilit=Frequency+counter that used two interrupts to count frequency... I used a rtc chip to generate the 1s interrupt rather than an inbuilt timer. I have an anemometer here that came from a ...
by mnf
Wed Sep 25, 2019 1:57 pm
Forum: Flowcode V8
Topic: BL0032 windspeed
Replies: 45
Views: 32950

Re: BL0032 windspeed

Hi Monie,

You don't seem to enable your timer interrupt in the code sample...

Martin
by mnf
Thu Sep 12, 2019 9:02 pm
Forum: Flowcode V7
Topic: Convertin from decimal to Characters
Replies: 4
Views: 3843

Re: Convertin from decimal to Characters

Try:
Decimal To Ascii.fcfx
(12.48 KiB) Downloaded 245 times
by mnf
Thu Sep 12, 2019 3:39 pm
Forum: Flowcode V7
Topic: Convertin from decimal to Characters
Replies: 4
Views: 3843

Re: Convertin from decimal to Characters

When you print out the read back characters you are 'printing' or displaying them as numbers (they are the ASCII representation of the desired string). Post your code and we'll be able to change if needed...

Martin
by mnf
Mon Sep 02, 2019 9:46 am
Forum: General Programming
Topic: FC8 Application Doesn't Run Properly
Replies: 2
Views: 2890

Re: FC8 Application Doesn't Run Properly

Try this.

[url]viewtopic.php?f=78&t=21435[\url]

I had to do the registry reset too...

Martin
by mnf
Tue Aug 27, 2019 9:04 am
Forum: General Programming
Topic: Converting Big Endian to decimal
Replies: 10
Views: 14993

Re: Converting Big Endian to decimal

I used https://www.scadacore.com/tools/program ... converter/ to check the required layout.

Martin
by mnf
Tue Aug 27, 2019 9:01 am
Forum: Flowcode V5 Issues
Topic: Flowcode V5 has stopped working
Replies: 6
Views: 7000

Re: Flowcode V5 has stopped working

I had similar problem after a recent windows update:

viewtopic.php?f=78&t=21435 sorted me out.... (I needed to do the RegEdit fix - but try the re-install first.)

Martin
by mnf
Mon Aug 26, 2019 3:53 pm
Forum: General Programming
Topic: Converting Big Endian to decimal
Replies: 10
Views: 14993

Re: Converting Big Endian to decimal

So the 4 bytes represent a 32 bit (4x8) floating point number.... Adding them doesn't do what you want - they are just a representation of the underlying 32 bits of data... See https://en.wikipedia.org/wiki/IEEE_754 if you want a summary of the full low down (and I suspect IEEE754 is a huge document...
by mnf
Mon Aug 26, 2019 9:46 am
Forum: General Programming
Topic: Converting Big Endian to decimal
Replies: 10
Views: 14993

Re: Converting Big Endian to decimal

... The computer memory is an 'array' of 8 bit 'cells' with an address for each (so for an Arduino - the address could be 0..2047 for it 2048 byte RAM) A 'variable' in a program is actually the address of one or more bytes in memory (so for a float (32 bit) it would point to 4 bytes somewhere in the...
by mnf
Sat Aug 24, 2019 4:49 pm
Forum: General Programming
Topic: Converting Big Endian to decimal
Replies: 10
Views: 14993

Re: Converting Big Endian to decimal

More usefully as a macro....
float.fcfx
(9.88 KiB) Downloaded 464 times
Martin
by mnf
Sat Aug 24, 2019 4:15 pm
Forum: General Programming
Topic: Converting Big Endian to decimal
Replies: 10
Views: 14993

Re: Converting Big Endian to decimal

This works (on an Arduino at least) float.JPG Uses an array of 4 bytes 'n and a float f and a string t (meaningful names!?) The C code puts the hex given into a float in reverse order (so f[3] = h[0]) and converts from hex to a float using a union... Just output converted value to UART as a test... ...
by mnf
Mon Aug 19, 2019 6:23 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Re: Flowcode closes...

Thanks Daniel,

That fixed things.. Any idea what went wrong though?

Martin
by mnf
Mon Aug 19, 2019 2:13 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Re: Flowcode closes...

Thanks, will give it a whirl this evening...
by mnf
Sun Aug 18, 2019 10:12 am
Forum: Flowcode V7
Topic: Convert text (Ascci) to Hex
Replies: 4
Views: 3758

Re: Convert text (Ascci) to Hex

- sending the message as a hex string seems strange? But - it is easy to do - StrToHex.fcfx Has 3 demonstrations 1) convert a string to hex a character at a time (output to UART) 2) Convert a string to HEX (so 'ABC' -> '414243') again output to UART. Note that here the output string MUST be large en...
by mnf
Sat Aug 17, 2019 1:12 pm
Forum: Flowcode V7
Topic: Convert text (Ascci) to Hex
Replies: 4
Views: 3758

Re: Convert text (Ascci) to Hex

It's not too bad to do: Assuming you want to convert everything to a hex string? For example: 'A' = 65 =0x41 (or 41?) So if .c = a character then add to the sms (0x if using) and HexDigit(.c >>4) and HexDigit(.c & 0x0f) Where HexDigit adds '0' to value if it is 0..9 and 'A' - 10 to value otherwise.....
by mnf
Fri Aug 16, 2019 5:20 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Re: Flowcode closes...

- nope, still bombs.

Tried running as admin too...

No error message.
by mnf
Fri Aug 16, 2019 4:34 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Re: Flowcode closes...

& something aint right...

Open a project (after fresh install) and CircularBuffer has no properties or macros.

Run updates (~CAL_UART_String only) and restart - and back to closing on start ((program loads then FC dies) :-(

Martin
by mnf
Fri Aug 16, 2019 4:22 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Re: Flowcode closes...

And finally back...

Uninstalled and re-installed and still closing. Opened a project and closed apart from 'start' page and 'properties'.

Opened a project from start page and back in business - no idea what went wrong?

Martin
by mnf
Fri Aug 16, 2019 3:59 pm
Forum: General Programming
Topic: Parity Check for SPI
Replies: 7
Views: 4739

Re: Parity Check for SPI

No problem. Let me know if you have any questions...
by mnf
Thu Aug 15, 2019 7:27 pm
Forum: Bug Reports
Topic: Flowcode closes...
Replies: 10
Views: 6267

Flowcode closes...

Latest windows update went through last night... Now Flowcode v8 opens and then closes after splash screen and home page opens (briefly) Only shows as a background process in Task Manager. Strangely - opening some projects (by clicking on the project in start menu) - results in the Property Window b...
by mnf
Thu Aug 15, 2019 8:02 am
Forum: General Programming
Topic: Parity Check for SPI
Replies: 7
Views: 4739

Re: Parity Check for SPI

I tried a small (16) byte lookup and depending on the loop type used it was either slightly faster or slightly slower than the rotate and count used above. Using a 'for' loop was much quicker than a while or until at least on an Arduino mega2560... Took approx 90s for 1million random number bit coun...
by mnf
Wed Aug 14, 2019 5:59 pm
Forum: General Programming
Topic: Parity Check for SPI
Replies: 7
Views: 4739

Re: Parity Check for SPI

Ok A simple bit count macro - and a test 'main' that just counts the bits in random numbers and spits the result to UART (with a 1s delay to give you a chance to check the result :-) ) Note that I'm counting 16 bits (of a WORD) here - you can modify if needed to count 12 or ignore bit 0 as required....
by mnf
Wed Aug 14, 2019 2:04 pm
Forum: General Programming
Topic: Parity Check for SPI
Replies: 7
Views: 4739

Re: Parity Check for SPI

Quickest is a lookup table - but depends on how much free memory you have.... (2 x 8 bit look ups?) (The value retrieved from table can even be byte with parity bit set - rather than count of 1s) Shift and add (count = count + (n & 1); n = n >> 1 for no. of bits)? Or with a bit of fancy math: - see ...
by mnf
Mon Aug 12, 2019 6:32 am
Forum: User Components
Topic: Thermistor component Range
Replies: 11
Views: 9558

Re: Thermistor component Range

There is an excellent description of usage on the Adafruitv site https://learn.adafruit.com/thermistor/overview
They describe the range of the thermistor as going to 125C but if you have a device capable of more then the techniques used the should be applicable.

Martin
by mnf
Sat Aug 10, 2019 4:31 pm
Forum: Flowcode V8
Topic: How to get data from solar inverter
Replies: 3
Views: 2170

Re: How to get data from solar inverter

Does that turn day into night :-)

No - sorry - I might have to google what one of those does?

Martin