Search found 222 matches

Return

by JonnyW
Fri Feb 04, 2011 2:09 pm
Jump to forum
Jump to topic

MX012 - Life on the PIC

Article: http://www.matrixmultimedia.com/resourc ... php?id=376

If you have any questions for the author or comments on the article, please post them below.
by JonnyW
Fri Mar 18, 2011 3:58 pm
Jump to forum
Jump to topic

Re: Weird problem with Game of Life

Hi Spanish_dude. Without seeing the program this is only a guess. Is this on an 8-bit pic? Chances are the bit-shifts are 8-bit. This means the instruction codes most likely only support (1 << 7) as the maximum shift available. I would guess that the ints are 'faked' using two byte values and accumu...
by JonnyW
Fri Mar 18, 2011 6:24 pm
Jump to forum
Jump to topic

Re: Weird problem with Game of Life

Hmm. Im unsure what could be the issue then. Unfortunately I havent got a Pic8 to hand at the moment. The only thing I can suggest is that, having looked at the Flowcode maybe try bracketing the variables in the defines, though it doesnt look like this is a problem. Either that or big-endianness cou...
by JonnyW
Thu Mar 31, 2011 8:53 am
Jump to forum
Jump to topic

Re: Local variables - Compiler Error

Hi Niro. Currently in Flowcode v4 there is an issue where local variables on the right of an '=' do not display as C-code variables properly. This is purely a visual issue to do with the tooltips and shouldn't affect the C compilation or how your program works. If you are unsure this is the case, co...
by JonnyW
Tue Jun 07, 2011 11:54 am
Jump to forum
Jump to topic

Re: variable manager

Hi there. We have a list of features that we are working towards but we occasionally tweak this as new possibilities become available. My worry would be if we posted a list it would be taken as 'definitive' and if features on there didn't make the final version there could be complaints. Anyway, per...
by JonnyW
Thu Jun 16, 2011 9:47 am
Jump to forum
Jump to topic

Re: Multiplying or dividing large numbers

Hi there. In Flowcode v5 we have plans to support unsigned 16 and 32 bit values. It would also be nice to have abs() and sgn() functions and I'll put this on the suggestion list. Until then, the single line: result = value * (1 | -(value < 0)) Will do the job of abs() in a single calculation line. I...
by JonnyW
Mon Jul 18, 2011 9:47 am
Jump to forum
Jump to topic

Re: Lottery Numbers Generator (Flowcode V4)

Hi Martin. If it helps, this wont be an issue in v5 due to greater signed/unsigned control but for now a small mod to the program would fix this. We suspect the issue is that the random() call on the PC is being pushed into a signed 32-bit value. This is then cast to a float (as all v4 simulated val...
by JonnyW
Thu Jul 28, 2011 9:24 am
Jump to forum
Jump to topic

Re: Integer Array?

Hi Mark. Sorry, Ive just re-read your post - still bleary eyed this morning. Another possibility if you are struggling for size (using an int array) and your 'X' value is always the same is to store a value of 0-2 in a byte array then do: X = (array[index] - 1) * speed Where 'array' is a byte array ...
by JonnyW
Thu Sep 01, 2011 8:46 am
Jump to forum
Jump to topic

Re: Comments and Strings

Hi Nicolas. Yeah, thats the idea. The final version would hopefully work similar to the screenshot. This shows the menu item and some disabled icons too.

disabled.jpg


Jonny
by JonnyW
Mon Oct 03, 2011 9:43 pm
Jump to forum
Jump to topic

Re: calling a macro from assembler

Hi Dave. After a bit of experimentation the syntax seems to be: asm { call FCM_macro } This is case sensitive (the macro was created lower case) and does not have closing brackets. I am not familiar with PIC assembly but Im assuming you will have to push each argument you need first. You can view th...
by JonnyW
Wed Oct 12, 2011 10:25 am
Jump to forum
Jump to topic

Re: If statement not working with OR?

Morning. Both operators can be used on any integer values, regardless of the bit size of that value. The reason why OR works as expected in the conditional is C (and Flowcode) treat 'true' as 'not false', therefore any non-zero value is true. For conditionals it is not usually as efficient, however,...
by JonnyW
Wed Nov 16, 2011 4:08 pm
Jump to forum
Jump to topic

Re: Register defintion

Hi Jan. You would typically use the pre-processor for this: #ifdef MY_CHIP char REGISTER_NAME; #else char YOUR_REGISTER_NAME; #endif This means that the C compiler would never see the inappropriate definition. For portability it may be an idea to define a 'generic' register name that you can use any...
by JonnyW
Wed Dec 14, 2011 4:38 pm
Jump to forum
Jump to topic

Re: Not seeing hardware UART receipt - anyone help?

Hi Christoph. Am I right in understanding? You have a board sending data via RS232, and Flowcode running in simulation mode on the PC at the other end. Though Flowcode will simulate send and receive of data, it does not receive and display data via the physical RS232. For this you need a terminal su...
by JonnyW
Thu Dec 15, 2011 2:23 pm
Jump to forum
Jump to topic

Re: Not seeing hardware UART receipt - anyone help?

If its any help, here is a link to TeraTerm, one of the better terminals. Use this to receive the incoming data or to send output data from it. You will need to set this up to the right port/baud, etc first.

http://hp.vector.co.jp/authors/VA002416/ttermp23.zip

Jonny
by JonnyW
Thu Jan 19, 2012 12:03 pm
Jump to forum
Jump to topic

Re: A little bug in V5

Hello. I would like to write a lcd screen UINT, ULONG, and Long variables. You can write signed long integers to a string using the ToString$(variable) function. You can then write this string to the LCD. Create a calculation and type: buffer = ToString$(variable) Where buffer is a string and variab...
by JonnyW
Wed Jan 18, 2012 9:22 pm
Jump to forum
Jump to topic

Re: Illegal symbol name

Hi. I'm sure someone will be able to add an official fix for this tomorrow, but if you need to get on with your work and this is holding things up: Navigate to the folder with the Flowcode5_PIC.exe in it (C:\Program Files\Flowcode\v5, I think) From there, open the CAL\PIC\PIC_CAL_ADC.c file in a tex...
by JonnyW
Sun Jan 22, 2012 10:35 pm
Jump to forum
Jump to topic

Re: Macro Icon Toolbar

Hi. Im surprised it doesnt, but I cant ever remember testing the layout save with this toolbar. I'll make a note and look into it Monday, I'm sure it can be done.

Cheers,

Jonny
by JonnyW
Tue Jan 24, 2012 6:06 pm
Jump to forum
Jump to topic

Re: V5 Upgrade ?

As an additional point, you can use the 'initialise' field of a variable to set this up how you would like, so for Blue set 'initial value' to "Blue". You could even go further and set these as constants. To do this, remove the references in the file for Blue = "Blue", set them a...
by JonnyW
Wed Jan 25, 2012 11:11 am
Jump to forum
Jump to topic

Re: use of trigonometric function in flowcode 4.3

Hello. Due to the limited space and floating-point support in 8-bit pics, these functions are not supported by Flowcode v4.3. Your best bet is to use lookup-tables and maybe 8 or 12 bit fixed point for trig, depending on how accurate you need to be. There is a good lookup table tutorial here: http:/...
by JonnyW
Sun Jan 29, 2012 11:27 pm
Jump to forum
Jump to topic

Re: Components not registered

Hi there. Thats odd. I remember seeing problems like this when we were in an Alpha release, around September time but have not seen them since. Steve is the expert as far as the components go so I'm sure he will have a few suggestions for fixing this. Not much has changed in terms of component regis...
by JonnyW
Fri Feb 03, 2012 10:55 pm
Jump to forum
Jump to topic

Re: Corrections and update.

Hi Jorgen. Yes, they will. v5.1 will hopefully be packaged and available early next week. We shall post details on the forum but if you enable the web-links toolbar in Flowcode (Menu->Help->Online Resources...) then barring any connection problems we will also ensure that the link is available throu...
by JonnyW
Mon Feb 06, 2012 12:02 pm
Jump to forum
Jump to topic

Re: file opening issues (pos licence limitations)

Hi. I am told that you should be able to load this up OK. Leastways, it should not crash Flowcode. I have hacked a copy so it doesn't load the component properly and hopefully found your crash (leastways, found a crash) but the failure to load the component in the first place is a different (probabl...
by JonnyW
Tue Feb 07, 2012 10:48 am
Jump to forum
Jump to topic

Re: Regarding floating output.

Hi Rahul. No, the free version does not have this limitation. You should be able to convert a floating point number into a string and display this string. In a string calculation box do:

s = FloatToString$ (f)

Then print the string. I hope this is what you are after.

Jonny
by JonnyW
Tue Feb 07, 2012 10:59 am
Jump to forum
Jump to topic

Re: two condition loop until?

Morning. in v5 the variable delays allow me to use numbers above 255 or would i still have to do 10 loops to get correct delay No need, you can use one call in v5. The delays support values up to 65536 of whatever unit you are delaying by. Inserting as an immediate constant allows up-to (and includi...
by JonnyW
Wed Feb 08, 2012 1:18 pm
Jump to forum
Jump to topic

Re: Eico 40 pin

Hi. This threw me at first! For the ECIO40, pins C4 and C5 are used for USB comms to enable reprogramming. They are not shown on the chip view for this reason (though they are on the 18F4455 chip view). However, if for some reason you want to program once and never allow reprogramming, I'm told you ...