Search found 1012 matches

by mnf
Fri Mar 15, 2024 9:35 am
Forum: Flowcode V8
Topic: fround command pic 24fFV
Replies: 4
Views: 105

Re: fround command pic 24fFV

One way to do this is to multiply the value by 100 (for 2 decimal places) and assign to an integer...
Note that not all numbers can be represented exactly by fp variables.

Can I also suggest an upgrade to v10 it's free and v4 is now very old

Martin
by mnf
Sat Mar 02, 2024 12:25 pm
Forum: Flowcode V8
Topic: Download the program for the device via the Internet.
Replies: 26
Views: 701

Re: Download the program for the device via the Internet.

If you want to 'download' a program - then you are limited to targets (for example the esp32) which can handle OTA updates. Don't expect it to be easy. It would also be possible on something like a Raspberry Pi - where your 'main program' could download new programs - and run them. If you are using ...
by mnf
Mon Jan 29, 2024 5:39 pm
Forum: General Programming
Topic: Rotates 8 bits
Replies: 2
Views: 1035

Re: Rotates 8 bits

You need to shift and then add the shifted 'out' bit back in. so assuming 8 bit values (.x and .msb and .lsb) .msb = .x & 0x80 .x = (.x << 1) | (.msb != 0) // Or use (.msb >> 7) not sure which is quicker? Will do a left rotate - note you could probably cram it into one line and do without the extra ...
by mnf
Wed Nov 29, 2023 11:50 am
Forum: Feature Requests
Topic: Fast display ST7789!
Replies: 88
Views: 140924

Re: Fast display ST7789!

Yes - I got a couple of batches at about that time and some worked and some not - hence the above thread... As a test - try running them using the Adafruit libraries and the Arduino IDE - if they work it's an initialisation problem (and I'd guess you'd be very unlucky to get 50 duff displays...) If ...
by mnf
Tue Nov 28, 2023 10:15 pm
Forum: Feature Requests
Topic: Fast display ST7789!
Replies: 88
Views: 140924

Re: Fast display ST7789!

Yes, I think so.

There seem to be several variants which need slightly different startup sequences.

If you give me a pointer to the display you are using I'll see what I can do...

Once you have the initialisation correct the rest is fairly straightforward..

Martin
by mnf
Tue Nov 07, 2023 9:11 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 5332117

Re: some problems with spi data transmission

I think the issue might be one of timing, In the receiver - have an interrupt on CS change (it limits the choice of pins for this) - then attempt to receive the data. I don;t know whether it would be possible to receive in the interrupt handler (small number of bytes maybe? - depends if the receive ...
by mnf
Mon Sep 18, 2023 1:25 pm
Forum: Flowcode V8
Topic: Change clock frequency in Flowcode to match Arduino hardware [Solved]
Replies: 4
Views: 8447

Re: Change clock frequency in Flowcode to match Arduino hardware [Solved]

Glad to hear it worked okay..

There are many good changes in v10 - so it's maybe worth talking a peek if time allows...

Martin
by mnf
Sun Sep 17, 2023 8:28 am
Forum: Flowcode V8
Topic: Change clock frequency in Flowcode to match Arduino hardware [Solved]
Replies: 4
Views: 8447

Re: Change clock frequency in Flowcode to match Arduino hardware

As a temporary fix you can edit the definition file. Assuming you are using v8 - it is in C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\ARD Make a backup copy of Arduino Lilypad Usb.fcdx Then edit it (the original) (notepad, notepad++) - and change <clock max_speed="16000000" master_divider="1" fixed="160...
by mnf
Sat Jul 01, 2023 7:55 am
Forum: Feature Requests
Topic: Component for a 24LC512-I/P Serial I2C EEPROM
Replies: 3
Views: 8311

Re: Component for a 24LC512-I/P Serial I2C EEPROM

Let us know how you get on.
Any problems - someone will always help...
by mnf
Thu Jun 29, 2023 9:23 pm
Forum: Feature Requests
Topic: Component for a 24LC512-I/P Serial I2C EEPROM
Replies: 3
Views: 8311

Re: Component for a 24LC512-I/P Serial I2C EEPROM

Hi Christina, I posted some code at https://www.matrixtsl.com/mmforums/viewtopic.php?t=22422 which should be fairly easy to tweak. Alternatively, all the components now have the source code available (see the fc wiki) (thanks to Matrix!) and you could probably get this to compile under v8 with a few...
by mnf
Thu Mar 02, 2023 9:37 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

I doubt it's a problem with the compiler. The fact it all works from another compiler is odd though :? What happens if you try to light a single segment - output 0 to a digit select pin and 1 to segment pin (using output icons or add single digital pins as properties and do select = 0, segment = 1 i...
by mnf
Thu Mar 02, 2023 7:04 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Okay - so it's starting to sound more like a wiring / hardware issue? Except that you managed to get it to work from other languages? I notice in the video that the display segments are very bright - do you have a current-limiting resistor to each digit? I noticed with my 4 digit display that if I d...
by mnf
Wed Mar 01, 2023 10:08 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

In the clip the digit does appear to be 'counting' down. With lots of extra 'guff' displayed. I got three digits working with an Arduino - using a 4 digit display (hardware) but treating as 3 individual digits (I ignored the left hand digit) I used a 1k resistor to each of the digit select pins (alt...
by mnf
Wed Mar 01, 2023 8:34 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

In the example you have sent, there is no timing. The decrement is done by the interrupt and the multiplexing is also done by another interrupt. What I have sent is basically the example that is in the Flowcode wiki I don't remember the name but it is in the help of the operation of the 7 segments. ...
by mnf
Wed Mar 01, 2023 8:03 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

That's interesting - and tells us a fair bit.. How about if you remove the timer interrupt that counts down?

I have a couple of the 7 segment displays - I'll try wiring them up and getting them going. Will have to be a different MCU though..

Martin
by mnf
Wed Mar 01, 2023 6:30 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Just to try and see where the problem lies: Please can you try this - I did a minimal display routine (based on yours - I really just removed the code to modify the values) - but I'd be interested to know if this displays correctly on hardware. If the clock is correct etc it should countdown at ~1s ...
by mnf
Tue Feb 28, 2023 11:58 am
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Okay - let us know how it goes...

Martin
by mnf
Mon Feb 27, 2023 10:50 am
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Take a look at the sample code for the 7seg display (at https://www.flowcode.co.uk/wiki/index.php?title=Component:_7Segment_(Single)_2D_(Segment) ) This uses an interrupt to handle the 'switching' between digits. Note that this can either occur in an interrupt or in the main loop (not both) I would ...
by mnf
Sun Feb 26, 2023 9:45 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

The warning about non re-entrant function means that a function may occur in an interrupt - but probably shouldn't (the result will be incorrect if an interrupt occurs whilst the code is doing a division and the interrupt handler uses division for example) So you should remove calls to divide and mo...
by mnf
Sun Feb 26, 2023 10:13 am
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Next problem.

There is a call to multiplexado in entrada_paros.

This won't work in an interrupt routine (imagine the problem if the display is updating when an interrupt occurs)

Can I also suggest using an array for the individual digits...

Martin
by mnf
Sat Feb 25, 2023 2:01 pm
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

I think one problem is that the interrupt handler (Cuentar_Grabar) calls Multiplexado. This will cause 'issues' if an interrupt occurs whist the code is in Multiplexado - although the compiler has attempted to negate this by duplicating the function - I think it will still cause things to 'break'. C...
by mnf
Sat Feb 25, 2023 8:24 am
Forum: Flowcode V8
Topic: No funciona proyecto con pic16F883
Replies: 29
Views: 196625

Re: No funciona proyecto con pic16F883

Hi

Looks like you have a function that calls itself either directly or indirectly.

Please post your code (the..fcfx file) and someone will take a look...

Martin
by mnf
Sun Feb 05, 2023 7:12 am
Forum: Flowcode V8
Topic: UART ATMEGA328
Replies: 2
Views: 5955

Re: UART ATMEGA328

There are quite a few examples on the board try viewtopic.php?t=22338

Use the Rx interrupt to receive the data

Martin
by mnf
Thu Feb 02, 2023 9:42 pm
Forum: Flowcode V8
Topic: wav sounds with Arduino nano
Replies: 7
Views: 15600

Re: wav sounds with Arduino nano

Thanks,

It looks good - a very neat solution - does it work on hardware or does the SD card speed limit it. I wasn't aware of the WavPlayerFAT component - but it looks a useful addition, and does the double buffering too.

Martin
by mnf
Wed Feb 01, 2023 11:08 pm
Forum: Flowcode V8
Topic: wav sounds with Arduino nano
Replies: 7
Views: 15600

Re: wav sounds with Arduino nano

Easy - but the tmrpcm library is doing a lot of the work.. It is how I did it as well, except no library - did you look at the above link - I used pin 11 for the output - this would need to be changed to pin 9 to allow the ad card to be read using hardware spi. Try modifying my code and I'll try and...