Search found 759 matches

by mnf
Tue Sep 22, 2020 8:04 pm
Forum: Bug Reports
Topic: Signed/Unsigned int property
Replies: 6
Views: 30

Re: Signed/Unsigned int property

Yes - the problem is in FC...

The actual value is 32 bit (on hardware) which is correct - it's just the mismatch of using Z for 16 bit values in variables and 32bit values in properties..

Martin
by mnf
Tue Sep 22, 2020 6:03 pm
Forum: Bug Reports
Topic: Signed/Unsigned int property
Replies: 6
Views: 30

Re: Signed/Unsigned int property

bits.jpg How many bits does 'test' have Z implies 16.... Another visual glitch - component groups lose their description if the window is resized using the maximize/minimize button - though they recover if resizing by dragging the window. How many is lost depends on how small the window goes... com...
by mnf
Mon Sep 21, 2020 9:50 pm
Forum: Flowcode V8
Topic: Uart!
Replies: 3
Views: 42

Re: Uart!

Okay - a small program. This watches UART2 (here a software channel - receive on D2, Tx on D3) - looking for numbers sent as a string (using SendNumber - or in my case putty and a FTDI converter...) A number of up to 10 digits is converted to a 32 bit unsigned int (so max is 2^32-1) and the string a...
by mnf
Mon Sep 21, 2020 8:57 pm
Forum: Flowcode V8
Topic: Uart!
Replies: 3
Views: 42

Re: Uart!

Hi Jorgen,

Send number converts the number to an ASCII string and sends that - you could receive that and convert back. Alternatively spilt into bytes and send and recombine..

I can do a simple example if it would help..

Martin
by mnf
Mon Sep 21, 2020 8:35 pm
Forum: Flowcode V8
Topic: Installing Flowcode Ver 8 on a new Laptop.
Replies: 2
Views: 51

Re: Installing Flowcode Ver 8 on a new Laptop.

Hi Bill,
Have you installed the AVR tool chain?

See https://www.matrixtsl.com/flowcode/download/

Martin
by mnf
Mon Sep 21, 2020 6:38 pm
Forum: Bug Reports
Topic: Signed/Unsigned int property
Replies: 6
Views: 30

Re: Signed/Unsigned int property

Tested on hardware (Arduino mega) - result was 32 bit.

Martin
by mnf
Mon Sep 21, 2020 6:10 pm
Forum: Bug Reports
Topic: Signed/Unsigned int property
Replies: 6
Views: 30

Signed/Unsigned int property

A minor visual bug...

Add an signed or unsigned int property to panel - this is shown as Z or Z+ - however the property is actually 32 bit. So should be shown as L or L+. I had to test whether the variable was 32 bit (which I needed) or 16bit....

Martin
by mnf
Wed Sep 16, 2020 9:56 am
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Thanks for the feedback. I'll add the remap pins and try battery power. The folder structure is already supported - folders can either be names 01..nn (and I've seen this documented as either 10 folders or (more likely) 100 (so 00..99)) There is a PlayMP3Folder that plays tracks from a folder called...
by mnf
Mon Sep 14, 2020 4:56 pm
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Thanks to both, I'll try the 10k resistors.. the 1k in the tx doesn't make much difference.
The sound from dac_l and r is actually pretty good....

Martin
by mnf
Sun Sep 13, 2020 10:10 pm
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Sadly it didn't work like that - nasty 'tractor' noise in the background :| , back to dac_l and dac_r. Everything going wrong this evening - now it will only play track 1 and none of the queries return anything. Except I hadn't changed anything - just tweaked the test program to try different things...
by mnf
Sun Sep 13, 2020 8:05 pm
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Thanks - will give it a go....

Martin
by mnf
Sun Sep 13, 2020 6:04 pm
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Tried playing via the DAC - through a mono amplifier. I'm a bit confused as to wiring DAC_L/R to amp with gnd to ground just gave a nasty buzz.. Connecting L and R to + gnd on the (mono) amp worked ok with pretty good sound. However playing a stereo track only played one channel - how should this be...
by mnf
Sat Sep 12, 2020 5:42 am
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

Re: DFPlayer mp3 player

Thanks Martin, I'm keen to check it works with other MCUs as well as Arduino. Also ideas on the interface - it has quite a lot of macros (the Df player is very flexible!) - very easy to write - most macros are a single line of code... The one problem I found is that a small delay is needed after a p...
by mnf
Fri Sep 11, 2020 3:52 pm
Forum: Flowcode V8
Topic: Catch incoming data without interrupt
Replies: 5
Views: 158

Re: Catch incoming data without interrupt

Another idea - use the CAL_UART component - there are Receive Array / String macros with a timeout. Just used with dfplayer and seem to work well...
by mnf
Fri Sep 11, 2020 3:49 pm
Forum: User Components
Topic: DFPlayer mp3 player
Replies: 12
Views: 203

DFPlayer mp3 player

Recently been trying to get one of these working. I tried using some code on the forum but it wasn't working for me :-( So I made a small component - the interface is a bit 'busy' for FC. Suggestions welcome - I' suspect naming similar routines to keep them together (PlayTrack, PlayFolder, Play....)...
by mnf
Thu Sep 10, 2020 2:12 am
Forum: Flowcode V8
Topic: Catch incoming data without interrupt
Replies: 5
Views: 158

Re: Catch incoming data without interrupt

Try a slower speed - 57600 is pushing it for a software UART..
Can you get it to work at 9600 baud?

Can you post your code?

Martin
by mnf
Wed Sep 09, 2020 7:05 am
Forum: Flowcode V8
Topic: Catch incoming data without interrupt
Replies: 5
Views: 158

Re: Catch incoming data without interrupt

It's possible but not easy. You could busy wait watching the rx pin for a change of state and then receive - we managed this for the j1850 bus (effectively receiving data at 9600,baud) but timing was tight.. Use an Arduino mega. It has multiple tx/rx and this makes life much easier for debugging pro...
by mnf
Tue Sep 08, 2020 7:40 am
Forum: General Programming
Topic: Integer overflow
Replies: 5
Views: 231

Re: Integer overflow

Glad it's worked...

Let us know how the project goes...

Martin
by mnf
Mon Sep 07, 2020 10:33 pm
Forum: Flowcode V8
Topic: USB Mass storage on STM32
Replies: 11
Views: 246

Re: USB Mass storage on STM32

I have an idea how it might be possible to link the C code with FC... I did a simple test - I created a header file test.h and a corresponding c file test.c Test.h declared a function #ifndef __TEST__ #define __TEST__ extern int addem (int a, int b); #endif and test.c defined this (not very useful) ...
by mnf
Mon Sep 07, 2020 6:10 pm
Forum: Flowcode V8
Topic: USB Mass storage on STM32
Replies: 11
Views: 246

Re: USB Mass storage on STM32

Works for header only code....' For 'simple' code - you can include the headers and then add the C from the C files to the supplementary code box.. Just tried here - and, unsurprisingly, it doesn't work (the functions called aren't found by the linker) What we need is a way to add the 'c' files (so ...
by mnf
Mon Sep 07, 2020 8:02 am
Forum: Freelance Embedded Engineers
Topic: CREATE A USB MASS STORAGE DEVICE USING AN STM32
Replies: 10
Views: 358

Re: CREATE A USB MASS STORAGE DEVICE USING AN STM32

Looking at the Kiel code - it would be possible to convert to FC, but it would be a lot of work.... My advice would be - do the USB code in C... (Or pay someone to do it in C?). It should be possible to handle the USB seperately - downloading updates etc (which can still be in FC...) Plan B - use ha...
by mnf
Sun Sep 06, 2020 9:28 pm
Forum: Flowcode V8
Topic: USB Mass storage on STM32
Replies: 11
Views: 246

Re: USB Mass storage on STM32

#include "filename.h"
Or
#include <filename.h> \\ searches current paths
In a c block or supplementary code.
You can then use imports in c blocks ....
Good luck!
by mnf
Sun Sep 06, 2020 5:16 pm
Forum: Flowcode V8
Topic: USB Mass storage on STM32
Replies: 11
Views: 246

Re: USB Mass storage on STM32

Structures are only available in C.. So struct {int a; char b;} x; would define a structure (x) with an int and then a char (so x.a = 1 and x.b = 'c') - depends on the situation but you could use the C code in C blocks or use an array of bytes (though this can get a bit ugly...) (so in this case use...
by mnf
Sat Sep 05, 2020 9:35 pm
Forum: Flowcode V8
Topic: USB Mass storage on STM32
Replies: 11
Views: 246

Re: USB Mass storage on STM32

By convention - so there is a good chance - all caps names are used for constants.. ,(for example DEVICE_FS) - these should be defined in one of the header files. Also the structure of FS_Desc etc. If this is C they will either be initialised on a function (address passed in using & or dynamically a...