Search found 22 matches

by jim_g
Wed Dec 07, 2016 9:04 pm
Forum: Flowcode V7
Topic: I2C interface Problem with I/O port [Solved]
Replies: 5
Views: 4621

Re: I2C interface Problem with I/O port

Ben

I have (re)discovered the problem. The PCA9555 defaults to an input device on switch-on. Resetting this fixes the problem.

Sorry to wast your time!

Cheers

Jim
by jim_g
Tue Dec 06, 2016 6:31 pm
Forum: Flowcode V7
Topic: I2C interface Problem with I/O port [Solved]
Replies: 5
Views: 4621

Re: I2C interface Problem with I/O port

Ben

I have inserted the new files and I can see the recent datestamps in the subdirectories. Help... about still declares 7.1.1.0 and Sept 28 though.

There is no change to the results after re-compiling.

Cheers

Jim
by jim_g
Tue Dec 06, 2016 6:04 pm
Forum: Flowcode V7
Topic: I2C interface Problem with I/O port [Solved]
Replies: 5
Views: 4621

Re: I2C interface Problem with I/O port

Hi Ben

Just the same result. I also changed one of the addresses in ledTest() to a known incorrect value.
With the correct address, TransmitByte returns 0
With the incorrect address it returns 1

There are "sensible" looking clock and data pulses

Regards

Jim
by jim_g
Tue Dec 06, 2016 5:04 pm
Forum: Flowcode V7
Topic: I2C interface Problem with I/O port [Solved]
Replies: 5
Views: 4621

I2C interface Problem with I/O port [Solved]

Hi I am building some battery operated radio synchronised clocks for Christmas presents (and its getting close!). I abandonned this a couple of years ago because excessive clock time errors + the effects of noise + excessive coding complexity (especially the last one!) stopped it being fun. Now, wit...
by jim_g
Thu Nov 24, 2016 3:30 pm
Forum: Flowcode V7
Topic: Controlling PIC registers using XC8 C
Replies: 4
Views: 5067

Re: Controlling PIC registers using XC8 C

Hi, Martin I installed the MPLAB X IDE and that gives instant feedback if the registers are not recognised. As QMESAR suggested just using the register name in upper case does the job. Yes you are right, for the 18F45K22, it is necessary to use WPUB = 0b11110000; // weak pull-ups on PORTB.4-7 RBPU =...
by jim_g
Wed Nov 23, 2016 12:20 pm
Forum: Flowcode V7
Topic: Controlling PIC registers using XC8 C
Replies: 4
Views: 5067

Re: Controlling PIC registers using XC8 C

Thank you QMESAR, I will try this later today.
Cheers

Jim
by jim_g
Wed Nov 23, 2016 11:56 am
Forum: Flowcode V7
Topic: Controlling PIC registers using XC8 C
Replies: 4
Views: 5067

Controlling PIC registers using XC8 C

Hi I have developed a battery-powered clock that periodically synchronises with the MSF transmitter at Anthorn. So far, I have not had to resort to the use of C and I enjoy FlowCode's clarity compared with my previous failed C attempt for this project. I now have to refine the code to provide an acc...
by jim_g
Thu Jun 25, 2015 11:12 am
Forum: Flowcode V6
Topic: PIC 16F886 Interrupt on Change Not Working.
Replies: 3
Views: 2565

Re: PIC 16F886 Interrupt on Change Not Working.

Many thanks, Kersing, that fixed it.
Cheers, Jim
by jim_g
Wed Jun 24, 2015 11:52 pm
Forum: Flowcode V6
Topic: PIC 16F886 Interrupt on Change Not Working.
Replies: 3
Views: 2565

Re: PIC 16F886 Interrupt on Change Not Working.

Oh, and I was so concentrating on describing the symptoms, I forgot to add, please has anyone any clues!

Cheers

Jim_g
by jim_g
Wed Jun 24, 2015 7:44 pm
Forum: Flowcode V6
Topic: PIC 16F886 Interrupt on Change Not Working.
Replies: 3
Views: 2565

PIC 16F886 Interrupt on Change Not Working.

This is for a ham radio transmitter-receiver operating on the HF bands (160 through to 6 metres). The attached program is intended to provide an SPI and a parallel interface from a 4-bit word received by PORT B(3..6). The program is woken by a change in the value of these bits and should then provid...
by jim_g
Mon Mar 30, 2015 3:36 pm
Forum: Flowcode V6
Topic: RS232 outputs garbled strings.
Replies: 4
Views: 4206

Re: RS232 outputs garbled strings.

Thank you QMESAR, that fixed the problem. I had thought that Project options/clock speed set that.

Many thanks, Jim
by jim_g
Mon Mar 30, 2015 2:34 pm
Forum: Flowcode V6
Topic: RS232 outputs garbled strings.
Replies: 4
Views: 4206

RS232 outputs garbled strings.

Hi I have a PIC 18F45K22 running at 8MHz and am trying to receive command strings in the form L_nnn~ where nnn is an unsigned integer and L is an identifier. The received string is garbled as if the baud rate were set wrongly, but it looks OK. I have tried two RS232 sources, one a terminal, with the...
by jim_g
Thu Feb 12, 2015 12:37 pm
Forum: Flowcode V6
Topic: Variable already exists
Replies: 4
Views: 3526

Re: Variable already exists

Hi Ben I found the Wiki link, but that does not touch on the special Return variable. If the following change were made... Return type Specify the return type, or "No return variable" if the macro does not return a value. Selection of a return type automatically creates a special variable ...
by jim_g
Thu Feb 12, 2015 11:38 am
Forum: Flowcode V6
Topic: Variable already exists
Replies: 4
Views: 3526

Re: Variable already exists

Thanks for that Ben, yes it works. _But_ ... a) I already had two other macros with the same local variable Return defined (setDisplayContrast and setDisplayText) and the program compiled and worked without setComponent. b) If I delete the local Return variables in those macros, I got the error &quo...
by jim_g
Wed Feb 11, 2015 5:40 pm
Forum: Flowcode V6
Topic: Variable already exists
Replies: 4
Views: 3526

Variable already exists

Hi I am working up a display management (for a 4D DIABLO screen), part of a larger program, but when compiled it gives the error... GLCD_Test.c(1338:11): error: variable 'FCR_RETVAL' already exists GLCD_Test.c success failure Completed BoostC compilation, return = 1 C:\Program Files (x86)\Flowcode 6...
by jim_g
Mon Feb 09, 2015 1:48 pm
Forum: Flowcode V6
Topic: Returning a result from a macro
Replies: 3
Views: 3421

Re: Returning a result from a macro

Thanks for that. For the future, where (which section) can I find that kind of information (e.g. where in the help files, etc), please?
Jim
by jim_g
Mon Feb 09, 2015 12:34 pm
Forum: Flowcode V6
Topic: Returning a result from a macro
Replies: 3
Views: 3421

Returning a result from a macro

Hi I am trying to write a simple utility macro that receives a character, and returns the resulting ASCII value as a two character string with a leading zero added if necessary. I know that I shall kick myself when I hear the answer, (I'm still new with Flowcode!) but how do I implement the return v...
by jim_g
Wed Feb 04, 2015 9:34 pm
Forum: Flowcode V6
Topic: 9850 DDS Module
Replies: 5
Views: 6182

Re: 9850 DDS Module

Sorry, in manageFrequency and ddsSetFrequency, programWord = ddsFrequency * 34360 comes from the Analog Devices data sheet... Fout = Clkin * TuneWord/2^32 so TuneWord = Fout * 2^32 / ClkIn The chinese modules usually have a 125MHz clock, and my application will work with 1kHz steps, so this becomes....
by jim_g
Wed Feb 04, 2015 8:20 pm
Forum: Flowcode V6
Topic: 9850 DDS Module
Replies: 5
Views: 6182

Re: 9850 DDS Module

Peter

Here's another one, programming the DDS chip using a serial word (ties up fewer output pins). Tested with a 128 pulses per revolution I/Q resolver. I don't claim elegance but it works. Frequencies in kHz, which is what I wanted. Its going to be part of an automatic antenna tuner.

Jim
by jim_g
Tue Jan 13, 2015 6:42 pm
Forum: Flowcode V6
Topic: Problem with EB005 LCD Display
Replies: 8
Views: 5732

Re: Problem with EB005 LCD Display

Just in case anyone else needs to know, the offending configuration item was the extended instruction set, which I had enabled in error.

Regards

Jim
by jim_g
Tue Jan 13, 2015 6:19 pm
Forum: Flowcode V6
Topic: Problem with EB005 LCD Display
Replies: 8
Views: 5732

Re: Problem with EB005 LCD Display

Hi Benj

Thanks for the fast reply!

Yes, that fixed the problem. Looks like I've got some reading and learning to do! I count 6 changes.
Best Regards and thanks
Jim
by jim_g
Tue Jan 13, 2015 1:41 pm
Forum: Flowcode V6
Topic: Problem with EB005 LCD Display
Replies: 8
Views: 5732

Problem with EB005 LCD Display

Hi. I have just started to program using Flowcode 6 and I am making sure I can program each of my blocks successfully before I connect them together as a project. I want to use the display block EB005 with PIC 18F45K22 (the device I have 'standardised' on) but my Flowcode 6 program does not work. Su...