Compiles OK for me - what version of Flowcode are you using - and what errors are you getting?
Martin
Search found 1013 matches
- Wed May 23, 2018 1:01 pm
- Forum: Flowcode V5
- Topic: how to Square Root function in flowcode AVR (ATMEG328P)
- Replies: 4
- Views: 7214
- Wed May 23, 2018 12:56 pm
- Forum: Flowcode V8
- Topic: Flowcode 8
- Replies: 16
- Views: 7863
Re: Flowcode 8
Now downloaded! The 'Buy now' (upgrading) page is just blank though! First impressions are pretty good - 'tis a pity that the 'free' version doesn't allow you to access all the components? Martin + the code folding works great! - Some of the default colour combinations are a bit off (Try 'dark' pseu...
- Wed May 23, 2018 11:37 am
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Try adding some debug statements
So - for example - send StringIP to UART after receiving it.
What have you tried so far (did you implement the above/get rid of the StringIP ="") - any idea where is it going wrong?
Martin
So - for example - send StringIP to UART after receiving it.
What have you tried so far (did you implement the above/get rid of the StringIP ="") - any idea where is it going wrong?
Martin
- Wed May 23, 2018 11:34 am
- Forum: Flowcode V8
- Topic: Flowcode 8
- Replies: 16
- Views: 7863
Re: Flowcode 8
What time does version 8 go live?
- Wed May 23, 2018 10:30 am
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Another possible problem:
If SIZE is greater than the length of StringIP (20) - and after a '[' character is received there is no terminating ']' (due to a corrupted block or some other problem) then Ass_IP will overwrite memory causing a crash or subtle bugs?
Martin
If SIZE is greater than the length of StringIP (20) - and after a '[' character is received there is no terminating ']' (due to a corrupted block or some other problem) then Ass_IP will overwrite memory causing a crash or subtle bugs?
Martin
- Wed May 23, 2018 10:08 am
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Adding the calculation macro
Should do the trick (but note my previous comment about all the ip address being within SIZE bytes)
Martin
Code: Select all
StringIP[index] = '\0'
Martin
- Wed May 23, 2018 9:42 am
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Hi Ferla, Took a quick look at your code and (my Italian is no where near as good as your English) think I've spotted a problem: In Ass_IP ass_ip.png Just before you attempt to decode StringIP - you set it to "" (empty string) This will surely stop things working as you expect! Another possible prob...
- Mon May 21, 2018 6:45 pm
- Forum: Flowcode V8
- Topic: Flowcode 8
- Replies: 16
- Views: 7863
Re: Flowcode 8
v8 - looks very interesting.. Particularly the code-folding/layout options. The pricing will be a major decider for me - only been using v7 for less than a year - may have to wait for v9. I'll probably succumb to temptation and upgrade the key components that I use most - the rest can follow on as I...
- Mon May 21, 2018 6:40 pm
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Hi Ferla,
Can you post your current code?
Martin
Can you post your current code?
Martin
- Wed May 09, 2018 6:28 pm
- Forum: AVR & Arduino
- Topic: Arduino Multiple Slave Issue
- Replies: 5
- Views: 8946
Re: Arduino Multiple Slave Issue
Hmm - has an extra master_uninit in the transmit routine... Removing it doesn't fix things however.
Martin
Martin
- Wed May 09, 2018 12:06 pm
- Forum: Flowcode V7
- Topic: Formula Flowcode Buggy not found in W7 W10
- Replies: 2
- Views: 2442
- Wed May 09, 2018 8:11 am
- Forum: AVR & Arduino
- Topic: Arduino Multiple Slave Issue
- Replies: 5
- Views: 8946
Re: Arduino Multiple Slave Issue
Ok - so after your starter for 10..... What I'm trying to do is create a chain (actually a ring) of Arduinos.. The code that does('nt do) it is: MasterSlave.fcfx But note that it doesn't work :-( I did get a message spinning around briefly, but just random numbers and when I modified the code to tra...
- Tue May 08, 2018 5:49 pm
- Forum: AVR & Arduino
- Topic: Arduino Multiple Slave Issue
- Replies: 5
- Views: 8946
Re: Arduino Multiple Slave Issue
Thanks to Leigh and Martin... Yes, fell into the trap of reusing a variable, and giving it one job too many.
Martin.
Martin.
- Sun May 06, 2018 8:28 pm
- Forum: AVR & Arduino
- Topic: Arduino Multiple Slave Issue
- Replies: 5
- Views: 8946
Arduino Multiple Slave Issue
A small related problem - surely not enough to warrant a new topic. In a group of 3 arduinos - One acting as master and transmitting to two slaves. This seems to work aok - with one exception - one of the slaves seems to receive the data transmitted by the other slave (but not vice versa - it is alw...
- Wed May 02, 2018 6:29 pm
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Good luck - let us know how you get on!
Martin
Martin
- Wed May 02, 2018 8:45 am
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
Good luck - let us know how it goes...
Martin
Martin
- Sat Apr 28, 2018 3:43 pm
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
To answer a couple of questions from earlier: 1) the '%' is the mod operator (remainder) so i % 2 will return 0 for i = 0, 2, 4 and 1 (or true) for 1,3,5.... 2) Flowcode (v7 at least) does support multidimensional arrays... So for example a BYTE variable declared as: x[40][240] would declare an arra...
- Sat Apr 28, 2018 8:14 am
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
Other thoughts: 1) I copy the two nibbles to a variable - so that if an interrupt does occur the new data won't ovewrite what we are working on. If the timing is that tight, however, an interrupt occurring will likely mess things up anyway. 2) Replace the Output to port macros with inline C (or Asm ...
- Fri Apr 27, 2018 9:20 pm
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
I converted to use a bit mask. I was a bit unsure where the stretch clocks went out - so I've put them after odd pixels - this might need tweaking.... S_v7.fcfx As a question - the clock cycles output will be very short- are you sure on the timing of this - Flowcode does have some overhead - setting...
- Fri Apr 27, 2018 6:42 pm
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Okay - this parses an input ip address in the format a.b.c.d (ie 112.1.22.122) - note that the ip address should be in the correct format (ie 4 values 0..255) and NO allowance is made for variations (for example spaces, extra '.'s, missing values - allowing for every possibility makes the code much ...
- Fri Apr 27, 2018 6:19 pm
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
Sorry - the pseudo code is just meant to describe the steps required to do what you want to do.... It is easy to do a similar job in Flowcode - create dummy macros for sub routine - build the top level and then work down to the lower level routines. (This is known as "top down programming") So what ...
- Fri Apr 27, 2018 3:05 pm
- Forum: General Programming
- Topic: Uart Rx Byte to Variable
- Replies: 30
- Views: 14150
Re: Uart Rx Byte to Variable
Hi Ferla,
You need a slightly different approach if using a separator... I'll post you a sample this evening...
Martin
You need a slightly different approach if using a separator... I'll post you a sample this evening...
Martin
- Fri Apr 27, 2018 2:22 pm
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
For speed you could possibly either use a switch (or a jump table, though not easy in Flowcode) So in pseudo code: b = Read 4bits Switch on b 0: Writepixel(0)x4 ... 1: Write Pixel(0)X3 Write pixel(1) 2: Write pixel(0)X2 Writepixel (1) Writepixel(0) .... 15: Writepixel (1)x4 A lot more code but mostl...
- Wed Apr 25, 2018 5:26 pm
- Forum: Flowcode V5
- Topic: Protocol converter for graphical LCD
- Replies: 25
- Views: 20810
Re: Protocol converter for graphical LCD
Hi, My five cents worth of help: I wrote a program that decodes bitmap files for display - so while not exactly analogous to what you are doing may give some help: The code that reads a single row of a 4 bit file is : (may appear at the end - I haven't got the hang of getting images to appear mid me...
- Wed Apr 25, 2018 4:58 pm
- Forum: Programming Tips & Tricks
- Topic: I2C Address Sniffer
- Replies: 5
- Views: 6880
Re: I2C Address Sniffer
Thanks - Seems to work ok when the Nanos are reset - there is a brief window of opportunity before the body of the receiver program (a slightly modified Matrix example) runs but after the i2c_slave library has initialised.. I feel I should probably be responding with a ACK (or NAK)? rather than wait...