Search found 170 matches

by GTF
Sun Dec 29, 2013 12:33 am
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

Hi GTF, That is the wrong board on your link, this is the sensor: http://www.adafruit.com/products/1246 cheers Acestu They are the same the same other than the fixed address on the one you have. Hi, I have just taken the sensor off and connected it to an i2c line scanner, it says that it is present...
by GTF
Sat Dec 28, 2013 10:38 pm
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

What about the pullups that are on the sensor board? Or are these what you removed? With no connection/jumper for pin 2 (address select), is it NC to any traces? Also, it appears you can use the sensor board as is without the level shifter if you have no 5V I2c devices on the bus. http://learn.adafr...
by GTF
Sat Dec 28, 2013 8:32 pm
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

Looks like all the pullups are on the level shifter.
Edit: Guess I'm too slow on the keyboard!
by GTF
Sat Dec 28, 2013 7:29 pm
Forum: Flowcode V6
Topic: i2c LCD Component
Replies: 18
Views: 12536

Re: i2c LCD Component

I have also just ordered the one Benj linked to in this thread: http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=54&t=13102&p=53127&hilit=i2c+lcd#p53127 I was previously thinking of adding one to some projects. Now you have got me interested again. There are 8 available addresses for this de...
by GTF
Sat Dec 28, 2013 4:55 am
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

It could be a little more simple as below.
by GTF
Sat Dec 28, 2013 1:36 am
Forum: Flowcode V6
Topic: i2c LCD Component
Replies: 18
Views: 12536

Re: i2c LCD Component

I have not had a chance to play with V6 yet but I see that the property type for the LCD Address field is set to "Unsigned Integer" so the value 0x27 is converted to 39. Also, have you tried selecting hardware Channel 1 as the channel?

Grant
by GTF
Fri Dec 27, 2013 6:10 pm
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

I am adding the 8th bit (R/W) to the 7 bit address to get a full byte for my I2C devices to work. I think the Transmit/Receive in FC changes the way the Acknowledge bits are handled as is mentioned in the TSL2561 datasheet.
by GTF
Thu Dec 26, 2013 4:48 pm
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

Hi Grant, Small correction, the value for power up is 03h (00000011) as you mention earlier in your message, not 0x01 or 00000010 (0x02). So the third byte should be 0x03, not 0x01. Jac Thanks, I corrected this in my post to help avoid any confusion. Should have waited til after my first cup of cof...
by GTF
Thu Dec 26, 2013 4:24 pm
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

Hi, I'm just a beginner with this myself but this is my understanding after reading the datasheet found here: http://www.adafruit.com/datasheets/TSL2561.pdf If the address select terminal is floating (page 9 of datasheet): Slave address (7 bits) is 0111001 Add a 0 for the 8th bit if you are sending ...
by GTF
Wed Dec 25, 2013 12:27 am
Forum: General Programming
Topic: I2c Help please
Replies: 52
Views: 30645

Re: I2c Help please

Or if you are lazy, there are online conversion tools: http://www.binaryhexconverter.com/

Merry Christmas!

Grant

Edit: Or just use Windows Calculator in programming mode:
by GTF
Tue Dec 17, 2013 6:29 am
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Original FC hex on left. Same file on right after encrypt/decrypt without loading it to the chip. Does line 1 indicate that the BL will write a couple of bytes to 0x0000? I don't see any changes at that location after writing the file to the chip. And it reads back out the same(2 bytes from 0000). T...
by GTF
Mon Dec 16, 2013 8:25 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Here is the FC hex and BL hex together after programming the FC hex to the chip with the bootloader.
by GTF
Mon Dec 16, 2013 3:47 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Here is the end of the BL hex without the FC hex loaded. I am using the Diolan encrypted bootloader which I adapted for this chip and to work without the extended instruction set (not that I have any prior coding knowledge).
by GTF
Mon Dec 16, 2013 3:04 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Hi Benj, This is what I have for the linker options: -rb 0x800 -ld "C:\Program Files (x86)\Flowcode\v5\Tools\BoostC\lib" libc.pic16.lib rand.pic16.lib float.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f" This is the vector remap in the bootloader: ;Application FW RESET and INTERRUPT VECTORS #define APP...
by GTF
Sun Dec 15, 2013 11:24 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Today I did some minor housekeeping in the bootloader code, tested a couple of config bit changes, and commented the Low Interrupt vector lines (I notice that FC does not use this and it's code starts before this address. The chip also does not use this in the default "compatibility" mode). The BL w...
by GTF
Sun Dec 15, 2013 4:23 am
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Update for today: I think this may be related to the bootloader as I do not see this strange behaviour without it. When using the bootloader I found that I had to add 2 output icons (0-->C4, 0-->C5) at the start of my code to get it to run properly. C4/C5 are my LED outputs. Adding any LED activity ...
by GTF
Fri Dec 13, 2013 7:05 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

I see that INT1 and INT2 need to have their priority bits set (INT0 is always high). I have been testing using INT1. I don't see this bit set in the generated C code and I only see the high priority vector in the relevant ASM code. from C: //Interrupt //Interrupt: Enable RC1INT cr_bit(intcon2, INTED...
by GTF
Thu Dec 12, 2013 5:03 am
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Seems that I am still having trouble with this interrupt in my project. I added some LED flashes immediately at startup to check this and it appears that the interrupt triggers a reset. I do not see any fluctuation at the MCLR pin which has an external pullup. With the interrupt disabled and the INT...
by GTF
Wed Dec 11, 2013 3:20 pm
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

Thanks Benj. I also found that a suitable pull-down was required on the trigger signal line or it was not detected. In the tests shown that line was also connected with the + side of a pot, so I guess that provided the pull-down that I was missing.
by GTF
Sat Dec 07, 2013 12:52 am
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

Re: 18F14K50 External interrupt problem

I had some success today after some fixes to the flowchart, but I was also using INT1 rather than INT0. Still have to swap back to INT0 to confirm that INT0 works.
by GTF
Fri Dec 06, 2013 7:09 pm
Forum: General Programming
Topic: FCD file for 18FxxK50
Replies: 28
Views: 29577

Re: FCD file for 18FxxK50

Ok, I made a request in their forums. Lets see where it gets us! http://forum.sourceboost.com/index.php?showtopic=5245#entry19679 I added another request over there. I don't mind using an external crystal so I could live without the "crystal-less" USB, but I could really use the larger flash and hi...
by GTF
Fri Dec 06, 2013 5:10 am
Forum: Flowcode V5
Topic: 18F14K50 External interrupt problem
Replies: 16
Views: 12055

18F14K50 External interrupt problem

Hello All, I am not having much success on my first attempt with an external interrupt (RC0/INT0). I created the attached simple example to test this. If possible, I would like the interrupt to be triggered on the falling edges of the green trace. I would like the DAC output (yellow trace) to go low...
by GTF
Fri Nov 22, 2013 10:46 pm
Forum: Flowcode V5
Topic: I2C stops program
Replies: 5
Views: 5075

Re: I2C stops program

Hi, The write/read bit should be included with the address byte so that the address will be either 0x46 or 0x47 in high res mode, according to page 7 of the datasheet. It also appears that the delay needs to be at least 180ms in high res mode if I am reading it correctly. Grant edit: also, has the I...
by GTF
Fri May 10, 2013 1:22 pm
Forum: Flowcode V5 Issues
Topic: Avast see Fowcode dspic as a Malware
Replies: 12
Views: 15749

Re: Avast see Fowcode dspic as a Malware

I have a similar issue. When I try to open one of my FC files the Windows installer process starts and Vipre Antirus gives a known trojan warning. The FC .exe has been quarantined by VIPRE. I guess that the installer is trying to restore it and the cycle will just keep repeating. FC works if I set V...
by GTF
Mon Sep 17, 2012 3:06 am
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Although further testing is required to confirm desired operation, it seems my CPU clock speed was low.