Search found 39 matches

by Dave S
Mon Oct 03, 2011 12:23 pm
Forum: Flowcode V4
Topic: calling a macro from assembler
Replies: 5
Views: 4517

calling a macro from assembler

Hi,

I am having problems calling a macro from within asm. The help file says to call _FCM_MACRO() but the compiler doesn't like it.

asm
{
call _FCM_MACRO()
}

Any ideas on what I'm doing wrong please? (the name MACRO is just an example).

Thanks,

Dave.
by Dave S
Fri Sep 23, 2011 8:50 pm
Forum: Flowcode V4
Topic: Random() function
Replies: 5
Views: 5019

Re: Random() function

Dave, Thanks, I understand the concept, but how would I actually impliment that in Flowcode? In a C icon? If so please post the syntax. Thanks (and to Martin also) I just put srand(tmr0); in a C box at the start of the flowchart, then RandomNumber = random() in a calculation box when a random numbe...
by Dave S
Fri Sep 23, 2011 10:28 am
Forum: Flowcode V4
Topic: Random() function
Replies: 5
Views: 5019

Re: Random() function

medelec35 wrote:Random() is not really that random since same number sequences are always used from start up.
I used the seed srand(tmr0);

tmr0 is "unknown" on power up. Seems to work quite well.

Dave.
by Dave S
Wed Aug 17, 2011 9:51 am
Forum: Flowcode V4
Topic: PIC SFR's
Replies: 2
Views: 2414

Re: PIC SFR's

The contents of these registers cannot be accessed in simulation. With FlowKit, you would need to create a Flowcode variable for each SFR you wish to monitor and then put a C code icon in the program flow at the point where you wish to monitor the SFR(s). The C code window should basically set the ...
by Dave S
Thu Aug 11, 2011 7:58 pm
Forum: Flowcode V4
Topic: Reading individual bits
Replies: 8
Views: 6108

Re: Reading individual bits

I saw the flowkit document thanks. By tutorials do you mean the video's?

The "in circuit debugging" one just shows the simulator :roll:

Dave
by Dave S
Mon Aug 08, 2011 8:26 am
Forum: Flowcode V4
Topic: Reading individual bits
Replies: 8
Views: 6108

Re: Reading individual bits

Thanks Martin, There seems to be a lot of information on line. Problem is in finding it! Dave. I couldn't agree more, for that reason I posted this: http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=36&t=7451#p26400 Which is asking for more information on different types of bit/byte manipula...
by Dave S
Thu Jul 28, 2011 9:01 am
Forum: Flowcode V4
Topic: Reading individual bits
Replies: 8
Views: 6108

Re: Reading individual bits

Thanks Martin,

There seems to be a lot of information on line. Problem is in finding it!

Dave.
by Dave S
Wed Jul 27, 2011 8:40 pm
Forum: Flowcode V4
Topic: Reading individual bits
Replies: 8
Views: 6108

Re: Reading individual bits

Thanks Martin that's very useful. I'll try it out first thing in the morning. These statements appear to be derived from C? How do you find out what you can put in a decision box and what has to go in a C box? I find the Flowcode help files very limited. Is there a document somewhere that details al...
by Dave S
Wed Jul 27, 2011 5:41 pm
Forum: Flowcode V4
Topic: Reading individual bits
Replies: 8
Views: 6108

Reading individual bits

Hi all, Is there any way to read individual bits from a Flowcode variable without resorting to C code please? Something like a decision block with: "If Variable,3 = 1" with yes or no outputs. I can put : "If variable = 23" and it works fine but I need to test each of the 8 bits and act on the value ...
by Dave S
Tue Jul 26, 2011 9:50 am
Forum: Flowcode V4
Topic: WDT wake up from sleep
Replies: 6
Views: 5152

Re: WDT wake up from sleep

medelec35 wrote:Hi Dave.
Sorry, I did not read your post properly so got the wrong end of the stick.
I understand what your doing now.

Martin
Hi Martin, your answer is relevant to the next part of the code so thanks anyway.

Dave.
by Dave S
Tue Jul 26, 2011 9:47 am
Forum: Flowcode V4
Topic: WDT wake up from sleep
Replies: 6
Views: 5152

Re: WDT wake up from sleep

Thanks Rosenbaum, that was the problem. All working fine now.
by Dave S
Tue Jul 26, 2011 8:04 am
Forum: Flowcode V4
Topic: WDT wake up from sleep
Replies: 6
Views: 5152

Re: WDT wake up from sleep

Thanks for that Martin.

However, in this program auto clear watchdog is disabled and there are no loops or delays (except for a 6uS delay using asm nop commands.

Dave.
by Dave S
Mon Jul 25, 2011 3:53 pm
Forum: Flowcode V4
Topic: WDT wake up from sleep
Replies: 6
Views: 5152

WDT wake up from sleep

Hi all I have written a very simple program for the PIC 12F629 using the internal RC oscillator. Basically I set the watchdog timer to 2.3 secs using prescaler 1:128, send a narrow pulse to an output and put the device into sleep. The idea is to send the pulse once every 2.3 seconds by the WDT wakeu...
by Dave S
Mon Jun 20, 2011 3:47 pm
Forum: Flowcode V4
Topic: PIC SFR's
Replies: 2
Views: 2414

PIC SFR's

Hi, I am a new user of Flowcode having previously programmed PIC's in assembler. I was wondering if I can access the PIC special function registers such as TMR0, ADCON1, TRISB etc. during simulation. I cant find them in the WATCH window, only user created registers. If this is not possible can they ...