Search found 170 matches

by GTF
Thu Mar 31, 2016 8:51 pm
Forum: Flowcode V6
Topic: Trying to get i2C lcd working with Flowcode
Replies: 21
Views: 20448

Re: Trying to get i2C lcd working with Flowcode

The backpack must use the same read/write format as used in the FC component and the connections between the expander and LCD must match what is in the code. So not every backpack will work without modifications to the FC component. Is data being sent on the SDA line? Do you have a simple test flowc...
by GTF
Thu Mar 31, 2016 3:16 am
Forum: Flowcode V6
Topic: Trying to get i2C lcd working with Flowcode
Replies: 21
Views: 20448

Re: Trying to get i2C lcd working with Flowcode

Guessing it is the MCP23008 expander.
http://ww1.microchip.com/downloads/en/D ... 21919e.pdf

Looks like all the ones I have now use the NXP chip.
http://www.nxp.com/documents/data_sheet ... F8574A.pdf
by GTF
Thu Mar 31, 2016 1:18 am
Forum: Flowcode V6
Topic: Trying to get i2C lcd working with Flowcode
Replies: 21
Views: 20448

Re: Trying to get i2C lcd working with Flowcode

Backlights on the ones I have are on as soon as the backpack is powered. I have to turn them off in FC if I don't want them lit. What backpack is it?
by GTF
Wed Mar 30, 2016 7:59 pm
Forum: Flowcode V6
Topic: Trying to get i2C lcd working with Flowcode
Replies: 21
Views: 20448

Re: Trying to get i2C lcd working with Flowcode

I2C address will be from the datasheet for the expander chip on the backpack. And may be fixed or selectable on the backpack board with jumpers.
by GTF
Mon Mar 28, 2016 2:17 pm
Forum: Flowcode V6
Topic: SPI Master / Slave
Replies: 18
Views: 14558

Re: SPI Master / Slave

Looking at the NRF905 datasheet, there are a half dozen more pins that need to be wired to the PIC. A couple may simply need pullups if you want the NRF905 to be always powered up. Ensure that both the PIC and NRF905 are running on 3V. NRF905 needs 3V. You will need a level shifter on all lines betw...
by GTF
Mon Mar 28, 2016 3:20 am
Forum: Flowcode V6
Topic: SPI Master / Slave
Replies: 18
Views: 14558

Re: SPI Master / Slave

Hi John, As has per the other explanations here, you should relabel your image with both PICs as Masters and both NRF905s as slaves, then it should make more sense. You have no slave PICs. Think of it as working with just 1 PIC and 1 NRF905. The only difference is each PIC is sending different confi...
by GTF
Sun Mar 27, 2016 8:36 pm
Forum: Flowcode V6
Topic: 18F45K50 PWM Channel 1
Replies: 1
Views: 2832

18F45K50 PWM Channel 1

I built a PCB that utilizes PWM channel 1, but found that channel 1 did not work for the FC PWM component. The PWM CAL file configures channel 1 for enhanced mode, but this would not work without adding supplementary code to complete the configuration. Channel 2 is not affected as only channel 1 off...
by GTF
Sun Mar 27, 2016 7:23 pm
Forum: Bug reports
Topic: 18F45K50 EEPROM problem(solved)
Replies: 7
Views: 12814

Re: 18F45K50 EEPROM problem-SOLVED

The programs work fine if I use code blocks for the EEPROM write/reads rather than the FC EEPROM component. New test program attached. So I reviewed the CAL and FCD files again. It appears that the incorrect eeprom type is specified in the FCD. It should be type 3 not type 2. Seems to be working wit...
by GTF
Sun Mar 27, 2016 3:34 am
Forum: Bug reports
Topic: 18F45K50 EEPROM problem(solved)
Replies: 7
Views: 12814

Re: 18F45K50 EEPROM problem

This test program randomly worked a few times, but mostly will not. When it doesn't, nothing appears to be written to EEPROM. Code read in and read out are identical on compare.
by GTF
Sat Mar 26, 2016 8:19 pm
Forum: Bug reports
Topic: 18F45K50 EEPROM problem(solved)
Replies: 7
Views: 12814

Re: 18F45K50 EEPROM problem

The other small test program.

I think the changes I made just before the problem started was adding a circular buffer and a macro that reads those 5 top row addresses and sends the values out the UART. That macro is currently deleted.
by GTF
Sat Mar 26, 2016 8:04 pm
Forum: Bug reports
Topic: 18F45K50 EEPROM problem(solved)
Replies: 7
Views: 12814

Re: 18F45K50 EEPROM problem

The simple test flowcharts attached seem to work, mostly. But then I am only writing/reading to 1 or 2 addresses and have only 3-4 variables. My program should write to 28 EEPROM addresses during calibration, including a final write to address dec 52 of the dec value "126". I can see values written ...
by GTF
Sat Mar 26, 2016 2:01 am
Forum: Bug reports
Topic: 18F45K50 EEPROM problem(solved)
Replies: 7
Views: 12814

18F45K50 EEPROM problem(solved)

What might cause nothing to be written to the EEPROM? The program does not stall at any of the read or writes, but there is no data stored? I can get it to work with a bare bones EEPROM only test program, and it was working fine in my program up until yesterday. I have disabled any new code and most...
by GTF
Thu Mar 24, 2016 6:19 pm
Forum: Flowcode V6
Topic: LCD not working on my project Hardware
Replies: 22
Views: 12256

Re: LCD not working on my project Hardware

Yes SPI 3/4 wire.....MOSI/MISO, CLK and CS/SS.
by GTF
Thu Mar 24, 2016 5:45 pm
Forum: Flowcode V6
Topic: LCD not working on my project Hardware
Replies: 22
Views: 12256

Re: LCD not working on my project Hardware

No wireless. The datasheet link was for my own(and others') reference. I have been using LCDs from China, with or without the I2C adapters. FC has a prebuilt I2C LCD component that works nicely with the 1602 I2C adapters. Free shipping(be prepared to wait 1 month). No taxes or duties if the total va...
by GTF
Thu Mar 24, 2016 2:02 pm
Forum: Flowcode V6
Topic: LCD not working on my project Hardware
Replies: 22
Views: 12256

Re: LCD not working on my project Hardware

No I have not had a chance to play with it yet. Have used SPI though. Just wanted to clarify what the SPI device was and find the datasheet: http://www.nordicsemi.com/eng/content/download/2452/29528/file/Product_Specification_nRF905_v1.5.pdf Haven't looked closely at your FC or the datasheet yet but...
by GTF
Thu Mar 24, 2016 1:05 am
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

I think I have this resolved...again. It appears that the receiving MCU was attempting to intialize/connect to USB while the other MCU had control of the switched lines. USB would not usually be connected while receiving new CalData, so that explains why there was never an issue receiving that. Too ...
by GTF
Thu Mar 24, 2016 12:51 am
Forum: Flowcode V6
Topic: LCD not working on my project Hardware
Replies: 22
Views: 12256

Re: LCD not working on my project Hardware

Hi John,

Should your first disabled SPI macro be "Initialize" rather than "Uninitialize"? What SPI device are you sending data to?

Grant in Winnipeg
by GTF
Wed Mar 23, 2016 4:52 pm
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

Hello, What happens if you change the timeout parameter for the WaitForValue component macro from 0 to say 100. This should wait 100ms for the response before timing out but should avoid any blocking type lock ups. This skips the "Wait_for_Ready" and allows the data to be sent, preventing a waitfor...
by GTF
Tue Mar 22, 2016 4:56 pm
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

I think I tried that yesterday, but will give it another try to be sure.

Not familiar with USB. Is it normal that I should see activity on the USB lines when not sending or receiving? It appears that there is a packet every 10usec (packets sent at at 100kHz).
by GTF
Tue Mar 22, 2016 2:36 am
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

I guess I spoke to soon. The first time I tried the modified test program, it seemed to work, but I cannot get it to work again. Looking at a scope I do not even see the RS232 Send String macro transmitting anything. (this is just before the Wait_for_Ready macro). On many tries, only once did I obse...
by GTF
Mon Mar 21, 2016 6:48 pm
Forum: Flowcode V6
Topic: Sending a byte array as a string?
Replies: 3
Views: 8716

Re: Sending a byte array as a string?

Thanks Benj. That is basically what I am doing. Just thought I would give it a try with sending as a single string. It is possible that the values of some of the bytes are 0, as they are derived from 10 bit values that are split into high and low bytes. So a variable with a current value under 256 w...
by GTF
Mon Mar 21, 2016 4:57 pm
Forum: Flowcode V6
Topic: Sending a byte array as a string?
Replies: 3
Views: 8716

Sending a byte array as a string?

Not sure if I am doing this correctly. I created a variable such as "data_string[14]" to send 14 bytes of data via UART to another MCU using a circular buffer to receive the data. The data is organized as: data_string[0] = byte1 data_string[1] = byte2 . . . data_string[13] = byte14 If I send the str...
by GTF
Mon Mar 21, 2016 4:45 pm
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

Thanks Benj, that seemed to do the trick. I am actually using the circular buffer approach on the other MCU, which leads to the next question I will post.
by GTF
Mon Mar 21, 2016 2:43 pm
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Re: Possible to have both USB Serial and UART active?

Hi Benj,

Here is a pared down version of the program that acts as the bridge. I can transmit data back and forth on the UART fine until the USB is active. It seems to hang once it gets to the RS232 macros at the end of the Update_Current_Limit macro.
by GTF
Mon Mar 21, 2016 4:46 am
Forum: Flowcode V6
Topic: Possible to have both USB Serial and UART active?
Replies: 10
Views: 6786

Possible to have both USB Serial and UART active?

I would like to use both the USB serial (PC<>MCU) and UART(MCU<>MCU) but it appears that once the USB is initialized/connected, a RS232 send or receive macro call causes a MCU lockup. Should I be able to use both?

Thanks,
Grant