## Search found 18 matches

Return

Thu Mar 01, 2012 10:25 pm

### Re: Look-Up Tables Tutorial

im gonna play with this some and post some files when i get off work..... but there is no way to make a 6 and a 8 become 68? Yes that should be fairly straight forward If LUT1 = 6 and LUT2 is = 8 Then Result = LUT1 * 10 + LUT2 =68 Likewise for numbers >99 if LUT1 = 6 and LUT2 is = 8 & LUT3 = 2 ...
Tue Oct 16, 2018 4:56 pm

### Re: How to pass array as parameter to macro

Hello,

Here's an example.
ArrayDemo.fcfx

If you're still having trouble then please post what you have so far then we might be able to help directly with your project file.
Sat Dec 01, 2018 12:27 am

### Re: Create Timer loop(sec)

Pin change interrupt is automatically calls the interrupt macro, when the pin voltage changes voltage from one logic level to another. All you will be interested in are the two interrupt enables just before the main loop. All they do is set up the interrupt condition for you. E.g with timer1 interru...
Sat Dec 01, 2018 8:43 am

### Re: Create Timer loop(sec)

For the 16MHz clock frequency I have put something together for you.
As INT0 is used, you will need to connect the pulses source to pin D2.
Tue Nov 27, 2012 11:05 pm

### Rounding String or Float Variables

I though I would develop a different way to round off a float variable. Using pot you can select number of decimal places (0 to 6) Rounding off.png Decimal numbers are basically cut off, and not rounded up or down. E.g 1.29 to 1dp = 1.2 and not 1.3 Martin Edit: Temp2 with original flowchart is not r...
Mon Dec 03, 2018 9:35 pm

### Re: Rounding String or Float Variables

Hi Steven, I though I would develop a different way to round off a float variable. Using pot you can select number of decimal places (0 to 6) Rounding off.png Decimal numbers are basically cut off, and not rounded up or down. E.g 1.29 to 1dp = 1.2 and not 1.3 Martin How can I open this in flowcode V...
Mon Dec 03, 2018 9:09 pm

### Re: Create Timer loop(sec)

Hi Steven, You're welcome. So I would just place the two interrupts inside of a loop. No, you only have interrupts enabled the once at the start. The only time you enable again is if the interrupt has to be disabled for a reason. I was having the pulses source connected to pin B0, or would this not ...
Fri Dec 07, 2018 3:36 pm

### Re: Create Timer loop(sec)

Indeed, 16bit will be fine.
If you can post your flowchart that has the change from INT0 to IOC, then I will see what I can do for you.
Tue Dec 18, 2018 8:45 pm

### Re: SSD1306_i2c display not working

Hi Steven. The pull up resistors can maybe be configured in software depending on your chosen target device. For the AMEGA328P your looking at something like this C code to enable pullups for C4 and C5. DDRC &= ~0b00110000; PORTC |= 0b00110000; I'm not sure if they will stay in effect for the so...
Tue Dec 18, 2018 9:10 am

### Re: SSD1306_i2c display not working

Yes - sorry - channel 1 uses the hardware i2c on the MCU. A5 (Port C5) to SCL and A4 (C4) to SDA with pullup resistors (4.7k work aok) Note that FC doesn't use the inbuilt pullups - using external pullups is regarded as more reliable. How are you powering the display? The MCU and display must have a...
Thu Dec 20, 2018 2:43 pm

### Re: SSD1306_i2c display not working

Turns out it was the part display and there were foreign resistors on the board that was throwing the SCL & SDA off.
Got a display identical to Martin's and works! Thanks for the help again ya'll.

Missed that bit!

Glad to hear it's up and running

Martin
Thu Dec 20, 2018 11:06 am

### Re: SSD1306_i2c display not working

Got a display identical to Martin's and works! Thanks for the help again ya'll.

Glad it's working well for you now, thanks for letting us know.
Fri Dec 21, 2018 8:24 am

### Re: Frequency not being read(at all maybe)?

Hi Steven, You have not got a loop to continuously display updated frequency on your display. The initial frequency which will be 0 is displayed, then the code ends. Try the modified flowchart and see if it works any better? The maybe an issue with values flashing on the display? If that is the case...
Fri Dec 21, 2018 3:34 pm

### Re: Frequency not being read(at all maybe)?

Timer ISR.png
Fri Dec 21, 2018 8:46 am

### Re: Frequency not being read(at all maybe)?

Hi Steven, Your interrupt routine is incorrect too... INC.JPG Things only get changed if TimerTick = 61??? but TimerTick is never incremented. In IOCB PinChange is incremented (edit - This is counting the frequency - increment TimerTick in the timer interrupt) . You also are using floats (PinChange ...
Thu Jan 24, 2019 11:05 pm

Hi Steven, What device are you reading? Looks like you should read registers 0x08 to 0x0B into a uint array and then you can collect the data as follows. Here is some example code, readregister is a routine to read the 16-bit register value at the supplied address. data[0] = readregister(0x08) data[...
Wed Jan 30, 2019 6:52 pm