Search found 39 matches

by Dave S
Tue Nov 26, 2013 6:15 pm
Forum: Flowcode V4
Topic: General Flowcode String question
Replies: 5
Views: 5989

Re: General Flowcode String question

Hi Dazz, Can't see most of that either but I think I've answered my own question now. Macro send string will send all bytes declared, ie STRING[5] with 1234 will send 1234 and whatever gibberish is in the 5th byte. From that it looks as if the NULL at the end is transparent to the user. Thanks for y...
by Dave S
Tue Nov 26, 2013 3:12 pm
Forum: Flowcode V4
Topic: General Flowcode String question
Replies: 5
Views: 5989

Re: General Flowcode String question

Thanks Dazz but it won't open in Flowcode 4

Dave
by Dave S
Tue Nov 26, 2013 12:54 pm
Forum: Flowcode V4
Topic: General Flowcode String question
Replies: 5
Views: 5989

General Flowcode String question

Hi all, When a string is declared in C you add an extra byte for the "end of string" null character. For example a string to hold 1234 would be declared as STRING[5]. When using Flowcode Macro's to send or receive RS232 strings do we still allow for this null character or is it done by the Macro? To...
by Dave S
Wed Jun 05, 2013 10:53 am
Forum: Flowcode V4
Topic: Compare string Function
Replies: 1
Views: 2818

Re: Compare string Function

Hi all, Is there a maximum length of 3 for strings to compare? The attached code works ok but if I try to compare strings 4 elements long it doesn't. I change the number in the RS232 read string macro to 4 and (for example) string "001" to "0001". Any ideas please? DisplayPanel.fcf All seems to wor...
by Dave S
Tue Jun 04, 2013 3:44 pm
Forum: Flowcode V4
Topic: Compare string Function
Replies: 1
Views: 2818

Compare string Function

Hi all,

Is there a maximum length of 3 for strings to compare? The attached code works ok but if I try to compare strings 4 elements long it doesn't.
I change the number in the RS232 read string macro to 4 and (for example) string "001" to "0001".
Any ideas please?
DisplayPanel.fcf
(16.5 KiB) Downloaded 341 times
by Dave S
Wed Apr 17, 2013 5:59 pm
Forum: MIAC
Topic: Miac analogue input problem
Replies: 3
Views: 5041

Re: Miac analogue input problem

Thanks Medelec, yet again you have come to my rescue.
(If all else fails read the Manual :oops: )
by Dave S
Wed Apr 17, 2013 4:52 pm
Forum: MIAC
Topic: Miac analogue input problem
Replies: 3
Views: 5041

Miac analogue input problem

Hi, I have a program for the MIAC (Flowcode v 4.5) which reads an analogue value and uses it in a Timer. Read in 0-12V, approx 0-240. Divide by 10 = 0-24. This value is used in a Delay function to give a delay of 0 to 24 seconds. I've done this before on Pic's and it works well. Works great is simul...
by Dave S
Fri Jan 18, 2013 2:52 pm
Forum: Flowcode V4
Topic: TMR1 simulation
Replies: 3
Views: 3699

Re: TMR1 simulation

Thanks guys.
by Dave S
Fri Jan 18, 2013 1:16 pm
Forum: Flowcode V4
Topic: TMR1 simulation
Replies: 3
Views: 3699

TMR1 simulation

Hi,

I am using V4.5 and PIC18F4520. Can anyone tell me if Timer1 simulation is implemented please?

Thanks,

Dave.
by Dave S
Wed Nov 07, 2012 5:45 pm
Forum: Flowcode V4
Topic: Timer 1 interrupt
Replies: 5
Views: 5061

Re: Timer 1 interrupt

Thanks very much Enamul. Is there a manual for all this stuff is is it just trial and error?

Thanks again,

Dave.
by Dave S
Wed Nov 07, 2012 4:25 pm
Forum: Flowcode V4
Topic: Timer 1 interrupt
Replies: 5
Views: 5061

Re: Timer 1 interrupt

Hi Enamul, The code is large and commercially sensitive. The C generated by flowcode is: //Interrupt //Interrupt: Enable TMR1 st_bit(intcon,PEIE); st_bit(t1con,T1OSCEN); st_bit(t1con,TMR1ON); cr_bit(t1con,TMR1CS); t1con = t1con & 0x0F; st_bit(intcon,GIE); st_bit(pie1, TMR1IE); The line st_bit(t1con,...
by Dave S
Wed Nov 07, 2012 3:00 pm
Forum: Flowcode V4
Topic: Timer 1 interrupt
Replies: 5
Views: 5061

Timer 1 interrupt

Flowcode V 4.5 PIC16F887 Hi, I am using a TMR1 interrupt activated from the internal clock. When this is enabled Flowcode sets the LP Oscillator, (st_bit(t1con,T1OSCEN);), which causes RC0 and RC1 to be set as inputs. I am outputing PWM on RC1 (CCP2). I can rectify all this using C code each time th...
by Dave S
Wed Oct 31, 2012 2:37 pm
Forum: Flowcode V4
Topic: UART Interrupt not working (V4.5)
Replies: 3
Views: 3817

Re: UART Interrupt not working (V4.5)

Well that works fine Ben. Gives me something to work with.

Thanks,

Dave.
by Dave S
Wed Oct 31, 2012 12:07 pm
Forum: Flowcode V4
Topic: UART Interrupt not working (V4.5)
Replies: 3
Views: 3817

UART Interrupt not working (V4.5)

Hi, I can't seem to get the UART interrupt working (see attached code) in V4.5. If I put the IF statement in RxInt into the main loop and don't use the interrupt all works well. Unfortunately I need it to work from the interrupt fot the next stage. I have tried manually setting Intcon, PIE1 and PIR1...
by Dave S
Thu Sep 20, 2012 9:59 am
Forum: Flowcode V4
Topic: MIDI questions
Replies: 3
Views: 3786

Re: MIDI questions

Thanks for that guys. The output of the midi drum pad I have is 60 bits, possibly 64 if the last 4 are 1's. The pressure data appears to be around the 4th byte i.e. if you hit the pad with various intensity these bits change. I thought that midi was 3 bytes as well but this must be compatible someho...
by Dave S
Wed Sep 19, 2012 8:07 pm
Forum: Flowcode V4
Topic: MIDI questions
Replies: 3
Views: 3786

MIDI questions

Hi,

Is an 8MHz internal RC oscillator fast enough for MIDI to work? (PIC16F88)

The MIDI element reads in 3 bytes. Looking on a scope the level info I want is in a 4th byte. Is it possible to modify rhe custom code to read in a 4th byte please (C not my strong point).

Thanks,

Dave
by Dave S
Thu Oct 20, 2011 4:24 pm
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

medelec35 wrote:Your welcome Dave.
But to be honest, it’s all down to Ben’s solution.
If he did not post solution, I would have not been able to help.
Thanks Ben.

Martin
Ah, but you found it for be in amongst the hundreds of pages............ :)

Thanks to Ben as well.
by Dave S
Thu Oct 20, 2011 11:57 am
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

Success! I upgraded to v4.5 and got the same error messages as Martin. Martin's Test_Mod code compiles fine. Modified my Test code as per Martin's instructions, compiles ok. Modified my work in progress file the same, compiles ok. I guess this mod will be added on the next upgrade? Thanks very much ...
by Dave S
Thu Oct 20, 2011 9:25 am
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

Hi Steve, Martin, Ben, I have repeated Martins experiment. Opened a new project with just write Eeprom macro. Write to address 0, 0x55. Test.fcf Compiler gives errors as in OP. Changing Pic was probably irellevant. I have not touched the "customise C code". I noticed that the error message is differ...
by Dave S
Wed Oct 19, 2011 4:22 pm
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

That's it exactly Martin. I want to just use a different Pic. Hopefully I don't need to start a new project with the 16F1827 and rewrite all of the code again.

Dave.
by Dave S
Wed Oct 19, 2011 10:14 am
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

v4.3.7.63
by Dave S
Tue Oct 18, 2011 8:16 pm
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Re: Preprocessing error

Ok, thanks Benj.
by Dave S
Tue Oct 18, 2011 12:08 pm
Forum: Flowcode V4
Topic: Preprocessing error
Replies: 16
Views: 8607

Preprocessing error

Hi all,

I have just transferred a working program from a PIC16F886 to a PIC16F1827.

I now get these errors:

"EEPROM Error MX_EEADR not set"
"EEPROM Error MX_EEDATA not set"

Any ideas please?

Dave.
by Dave S
Tue Oct 04, 2011 9:28 am
Forum: Flowcode V4
Topic: calling a macro from assembler
Replies: 5
Views: 4395

Re: calling a macro from assembler

Hi Jonny, Your syntax works fine, thanks again. I'm not sure what you meant by "I am not familiar with PIC assembly but Im assuming you will have to push each argument you need first. You can view the C code and cut-paste the exact definition from there" The line "call FCM_macro" can be inserted int...
by Dave S
Mon Oct 03, 2011 10:03 pm
Forum: Flowcode V4
Topic: calling a macro from assembler
Replies: 5
Views: 4395

Re: calling a macro from assembler

Hi Jonny, Thanks for that, I'll try it first thing in the morning. (Doesn't agree with the help file though!) I've written a routine in assembler which receives data from a transmitter and I want to output the data via RS232 to check it has been received correctly using the flowcode macro. I'll let ...