Search found 1013 matches

by mnf
Mon Feb 25, 2019 7:58 pm
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

I don't quite follow - at some point you have to define the images you need... Defined in the supplementary code for the component and Setup is also defined in the component and will need editing to whatever images you are using. However, I don't think it is possible to build a completely general ve...
by mnf
Mon Feb 25, 2019 7:07 pm
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

Hi Martin, I still think an array is the way to go - otherwise as well as creating all the variables you'll need a mighty switch statement to access all the images.. I got a simple example up and running - it requires a 'setup' macro to be called, but that is quite usual for a component. I'd also re...
by mnf
Tue Feb 19, 2019 10:46 am
Forum: Programming Tips & Tricks
Topic: Frequency counter.
Replies: 3
Views: 7690

Re: Frequency counter.

Would be interested to hear how you get on... Unfortunately my Windows computer has gone wrong (more phut than bang - just the windows whirly or starting automatic repair) - so haven't had much chance to work on things. Away for a few days (Stornoway :D ) - will fix (fingers crossed) on return. Mart...
by mnf
Mon Feb 18, 2019 6:55 pm
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

As another idea, and avoiding pointers. Just store an array of offsets to the start of each image. So in pseudo code: to access image n data. Offset =images [n] For n =0 to image size{ Red = image_data[offset] Green = image_data[offset+1] Blue = .... Offset = offset +3 } Which should work in FC with...
by mnf
Mon Feb 18, 2019 1:16 pm
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

I didn't explain it well... The images array I proposed contains a list of pointers to the actual image data. It doesn't matter what values it contains as an end marker, as it isn't the actual image data... Hence the double dereferencing mentioned.. [quote]MX_UINT8 *data_ptr= FCV_IMAGES[0]; FCL_DATA...
by mnf
Mon Feb 18, 2019 12:25 pm
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

The data is RGB so has a value of 0 to 255. Only way to set to -1 is is using signed int. - End marker for the images[] array - 0 would do as well .... Rather than the for the image data. (the image data will need a width and height if size varies? and doesn't need an end marker) If the image data ...
by mnf
Mon Feb 18, 2019 11:38 am
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

Can you just populate the images array as created? In 'thought' code: Image[n] = current_start // Populate image data padding as reqd …. Image[n+1] = new_start Of course this means that the Image array will need to be stored in non volatile memory (as per the actual image data) and will probably nee...
by mnf
Mon Feb 18, 2019 10:56 am
Forum: User Components
Topic: Embedded C within a component. [Resolved]
Replies: 40
Views: 20318

Re: Embedded C within a component.

How about an storing an array of start addresses to each image data so then image_data = images[1] Needs a bit more care in the setup - you'll need to know the size of each images data - but then easy to access the data for each image using image[0], image[1] instead of image0, image1 Can access dat...
by mnf
Sun Feb 17, 2019 10:18 am
Forum: MIAC
Topic: RTC Clock
Replies: 12
Views: 9485

Re: RTC Clock

Hi Monie, I've downloaded and posted to you - note that I'm not sure that I'd recommend you using it as a template - it was written way back and (for example) has a string called 'string' that Flowcode will choke on - I renamed it test to allow the flowchart to load - but you will need to change oth...
by mnf
Sat Feb 16, 2019 9:03 pm
Forum: Programming Tips & Tricks
Topic: Frequency counter.
Replies: 3
Views: 7690

Frequency counter.

Inspired by the topic 'How fast an interrupt can capture external pulses' (https://www.matrixtsl.com/mmforums/viewtopic.php?f=63&t=20962)- and having just built an xr2206 signal generator (a cheap Chinese kit) So - an Arduino frequency counter. I hope to try this with an ARM chip (at 64MHz) - to see...
by mnf
Sat Feb 16, 2019 6:07 pm
Forum: Flowcode V8
Topic: Help converting file to work on ARM
Replies: 11
Views: 6125

Re: Help converting file to work on ARM

Hi Wayne, Looking at your code - it should be fairly straightforward to convert.... At present you have a custom interrupt for data received on the UART - but can you use a hardware UARTs and just use the RX interrupt - this would save a lot of trouble with undefined registers etc Getting rid of the...
by mnf
Sat Feb 16, 2019 9:33 am
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

I don't have v5 to check - it's in storage now.... Check here: http://www.matrixtsl.com/mmforums/viewtopic.php?f=26&t=10249&p=33484&#p33484 Where Ben gives some source for a circular buffer. Might be quite a bit of work! As an alternative - in your receive interrupt just use a receive string - and a...
by mnf
Fri Feb 15, 2019 10:37 pm
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

The commands in hex are just an ASCII representation of a 3 character command ("RED", "GRN", "BLU" and "PRG") - here saved to a 4 byte value. Take a look at ASCII (try https://en.wikipedia.org/wiki/ASCII) But basically each character can be represented as one byte (8 bits - 0..255) - so in the above...
by mnf
Tue Feb 12, 2019 7:39 pm
Forum: Programming Tips & Tricks
Topic: Component Creation
Replies: 10
Views: 15704

Re: Component Creation

Thanks Dave - looks a very useful guide - it's heading to the printer now. Beautifully laid out too!

Martin
by mnf
Tue Feb 12, 2019 7:34 pm
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

I've added images of the three main macros (the others won't help unless you have a MaxM LED setup and just deal with i2c comms to the LED array) moodlight.zip The interrupt adds any input from UART (in this case connected to a Bluetooth receiver) - to a circular buffer, and the main program loop sh...
by mnf
Tue Feb 12, 2019 7:19 pm
Forum: Flowcode V8
Topic: Correction in nRF24L01 component
Replies: 10
Views: 6026

Re: Correction in nRF24L01 component

I just added a comment querying the line! It was a long time ago!

The block read/write macros make for a neater interface though!

Martin
by mnf
Tue Feb 12, 2019 3:48 pm
Forum: Flowcode V8
Topic: Correction in nRF24L01 component
Replies: 10
Views: 6026

Re: Correction in nRF24L01 component

See also viewtopic.php?f=63&t=18962&hilit=Nrf
Where I mention this in one of the examples.

There is also an example using Shockburst and variable length packets which may be useful to you?
by mnf
Sun Feb 10, 2019 2:59 pm
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

Oops, just noticed I didn't post the link :oops:

viewtopic.php?f=26&t=20701

How goes your progress with this?
by mnf
Wed Feb 06, 2019 10:02 pm
Forum: Bug reports
Topic: Smudged display View C
Replies: 2
Views: 4767

Re: Smudged display View C

Yes, rebooting fixed things.
It was odd that it was just the View C window, everything else seemed to be okay, and that attempting a capture of the image using ashampoo 'snap' also caused the display to revert to normal whilst capture in progress...

Martin
by mnf
Tue Feb 05, 2019 10:34 pm
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

Try the example here - reads input from UART into a circular buffer and then copies it into a 6 byte array..

It uses the UART interrupt to read the data (a byte at a time) and copies to an array to just deal with it when sufficient input is received.

Martin
by mnf
Sun Feb 03, 2019 10:49 pm
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

Can you post your current code - and a bit more description of what you are trying to do. Arrays are a very useful feature in programming languages - well worth the effort to get to grips with them. You've probably used them already (for example strings are an array of characters) As a simple exampl...
by mnf
Sun Feb 03, 2019 4:20 pm
Forum: Bug reports
Topic: Smudged display View C
Replies: 2
Views: 4767

Smudged display View C

A strange (and hopefully shortlived) bug... Using FC7 and view C - and got this rather obfuscated view. Strangely trying to capture a view of it revealed the text - stopping the capture and it reverted to this... Snipping tool captured the image.. Capture.JPG FC8 worked ok - and hopefully a reboot w...
by mnf
Sun Feb 03, 2019 4:07 pm
Forum: Flowcode V8
Topic: Printing Hex on LCD without 0x
Replies: 2
Views: 1955

Re: Printing Hex on LCD without 0x

Ignore the first two characters (the '0x') Here is a simple example that copies the string from s1 to s2 (ignoring the first two characters) - or to avoid copying print out a character at a time in the loop. properties.JPG The final result is that s2 contains '1234' Note that you could also just shi...
by mnf
Sat Feb 02, 2019 7:53 am
Forum: Flowcode V5
Topic: conversion lin commands into an analog signal
Replies: 16
Views: 13737

Re: conversion lin commands into an analog signal

Sorry, misunderstood your question There seems to be little information on the matrix site. Try https://www.matrixtsl.com/mmforums/viewtopic.php?f=22&t=4566 Which has some (old) examples. The Lin course notes at https://www.matrixtsl.com/datasheets/EB929-82-03.pdf seems to stop at 3 although the ind...