Search found 37 matches

Return

by petesmart
Thu Jul 05, 2012 12:01 am
Jump to forum
Jump to topic

Re: EEPROM Question

Hi George,

I seem to recall have an issue with location zero on the EEprom... try using another location..... location one or two for example

see how you go

all the best

Pete
by Enamul
Tue Sep 11, 2012 9:54 am
Jump to forum
Jump to topic

Re: EEPROM Question

Hi, Here is a clock program using ECIO-40 but you can change that to any PIC with enough memory. To have clock running in the absence of power, you need to connect a 3.3V battery in Vbat pin of DS1307 IC. In the example program, you need to put time and date in the FIRST_TIME macro which keep record...
by Benj
Tue Sep 11, 2012 9:32 am
Jump to forum
Jump to topic

Re: EEPROM Question

Hello George,

The DS1307 device needs a I2C interface connection so you should be able to use the I2C component in Flowcode to communicate with the device.

Here is an article on the device.
viewtopic.php?f=29&t=8607&p=35668&hilit=DS1307#p35668
by medelec35
Sun Dec 06, 2015 3:56 pm
Jump to forum
Jump to topic

Re: Ulong to eeprom

Hi George,
Have you read this topic?

Martin
by Benj
Fri Jan 11, 2008 10:25 am
Jump to forum
Jump to topic

Hello The easiest way is to use a full two bytes. eg 16-bits. Firstly you will have your 16-bit integer variable, we will call this int_var. So to convert int_var into two bytes we do the following. byte1 = int_var byte2 = int_var >> 8 The two bytes can now be written to the EEPROM or the RS232 etc....
by Benj
Mon Jan 25, 2016 1:17 pm
Jump to forum
Jump to topic

Re: Using MOD function

Hello George, You could probably do something like this. INTHour = FloatToInt (Time) This stores the whole number of the hour in INTHour. FloatMinsAsPercentage = Time - INTHour This gets the minutes as a floating point number from 0.00 to 0.999999 Minutes = FloatMinsAsPercentage * 60.0 This converts...
by LeighM
Mon Jan 25, 2016 9:52 am
Jump to forum
Jump to topic

Re: Using MOD function

Hi,
Yes you can use MOD for that,
here is an example, where time is your minute counter and is a UINT, mins can be a BYTE, and hours a BYTE or UINT

Code: Select all

hours = time / 60
mins = time MOD 60
// or
mins = time % 60
by Jordy101091
Thu Mar 20, 2014 8:05 pm
Jump to forum
Jump to topic

DS3231 - RTC Time Keeper

DS3231 - Component Current Version = 1.68 Best Working Version = 1.68 Info: I have made a DS3231 component which lets you easy use the DS3231 device and configure it. No need to have difficult calculations. With this component you can just put in your time and date data in decimal values the compon...
by Benj
Mon Feb 08, 2016 4:50 pm
Jump to forum
Jump to topic

Re: MCP41010 Digital Pot

Hello George,

This should help to get you started with SPI.
http://www.matrixtsl.com/blog/simplifie ... c-and-spi/
by Benj
Tue Apr 19, 2011 4:51 pm
Jump to forum
Jump to topic

Re: V3 - Creating BYTE Array

Hello Ron, In flowcode you would create a byte variable and after the variable name you would type square brackets containing the array size. eg byte0[256] byte1[256] byte2[256] ... The bytes inside the array are addressed from 0 to the array size minus 1 in this case 255 giving you 256 memory locat...
by Benj
Thu Feb 25, 2016 5:29 pm
Jump to forum
Jump to topic

Re: DS18B20 7 segment temperature Display

Hello George, Thanks for posting the video it helps for us to see exactly what's going wrong. As your reading a 1-wire sensor which is very timing critical I would also advise you to disable the timer interrupt at the start of the DS18B20_Temperature macro and re-enable the interrupt at the end of t...
by Benj
Mon Feb 29, 2016 1:45 pm
Jump to forum
Jump to topic

Re: DS18B20 7 segment temperature Display

Hi George, Yes that's looking much better now. The Mod stuff should still work correctly if the number is negative. You may need a decision icon to see if the number is negative to allow you to display the minus symbol. Get_Temp < 0 Should go down the yes branch if the number is less than 0. Regardi...
by Dave Squibb
Fri Jun 03, 2016 12:37 pm
Jump to forum
Jump to topic

Re: Wake from SLEEP using TMR1 interrupt

Finally got this working. If anyone has this problem in the future add the C code "set_bit(t1con,2);" after the flowcode TMR1 interrupt enable Macro (on my flowchart above). From PIC16F88 data sheet: T1CON bit 2 T1SYNC: Timer1 External Clock Input Synchronization Control bit TMR1CS = 1: 1 ...
by medelec35
Sat Mar 02, 2013 3:17 am
Jump to forum
Jump to topic

Creating Custom LCD Characters Flowcode V4 & V5

Objective: Create a custom volume display with lowest volume showing a single line, next volume level = 2 lines etc. Just like this: Volume 1.png You don't need to add any custom code to LCD component. Just add code at the beginning of you program in the form of: FCD_LCDDisplay0_RAM_Write(Custom cha...
by EtsDriver
Sat Jul 02, 2016 12:14 pm
Jump to forum
Jump to topic

Re: Creating Custom LCD Characters Flowcode V4 & V5

Hello to all! Using Flowcode 6, I was trying to add a few custom characters into the LCD as medelec35 presented above. I managed to add some custom characters but after adding the 9th character i am facing a problem. The problem is that instead of the character number 9 the LCD shows a random chara...
by LeighM
Tue Jul 19, 2016 10:40 am
Jump to forum
Jump to topic

Re: GSM Component

That looks like you might be reading the message in PDU mode and the message data is in its encoded form.
Have a good read through the AT command reference for your modem and see if there are commands for setting text mode.
by LeighM
Tue Jul 26, 2016 1:19 pm
Jump to forum
Jump to topic

Re: GSM Component

Hi,
It's probably not as clear as it ought to be...
The StringReceive returns the value 1 if a string (reply) was received, 0 otherwise.
If the return is value 1, then call ReadString to copy what was received to your local string.
Hope that helps,
Leigh
by petesmart
Sun Aug 21, 2016 11:58 am
Jump to forum
Jump to topic

Re: Load Cell HX711

Hi George, Attached is a macro is created in fc6, it will also work in fc7. It reads 24 bits of data from the hx711 chip....the project I used this for was a 4 load cell scale connected in a Wheatstone bridge config. Import the macro into your project and call it as a routine. Note - given the sensi...
by petesmart
Mon Aug 22, 2016 12:05 pm
Jump to forum
Jump to topic

Re: Load Cell HX711

ok... had a look at your project.... when I created the macro, I left all of the config options disabled :oops: - you will need to enable the icons in the red circle and then it should work...the data sheet will give you a good insight as to the config options vs function let me know how you go best...
by STibor
Tue Jun 07, 2016 8:28 pm
Jump to forum
Jump to topic

Re: max7219/SPI troubles.

Hi! initialize Chip_Select := 1; SPI_Init; Chip_Select := 0; SPI_Send_Char=0x0b; SPI_Send_Char=0x07; Chip_Select := 1; Chip_Select := 0; SPI_Send_Char=0x09; SPI_Send_Char=0xff; Chip_Select := 1; Chip_Select := 0; SPI_Send_Char=0x0c; SPI_Send_Char=0x01; Chip_Select := 1; Chip_Select := 0; SPI_Send_Ch...
by Benj
Mon Oct 10, 2016 5:32 pm
Jump to forum
Jump to topic

Re: max7219/SPI troubles.

Hi George, I would do something like this. First copy the float into an integer variable. This will copy the whole part of the number leaving the decimal point. Then update the float variable so it only contains the real part of the number. int = float float = (float - int) Then check if the number ...
by Benj
Tue Oct 11, 2016 9:56 am
Jump to forum
Jump to topic

Re: max7219/SPI troubles.

Hello,

To switch a number 0-9 into the binary value I would use a switch icon with all cases 0-9 ticked.

Then for say the 1 branch you can use the hard coded value 0b00110000.
by Benj
Thu Dec 01, 2016 6:19 pm
Jump to forum
Jump to topic

Re: KEYBOARD USB HID

This should hopefully help.

USB_HID_Keyboard_Strings.fcfx
by medelec35
Fri Feb 03, 2017 8:55 am
Jump to forum
Jump to topic

Re: Interrupt On ShutDown

What I have done is supply microcontroller VDD via a diode from +5v. So anode is conneted to +5V power supply and cathode is connected to VDD of microcontroller. Connect a 470uF capacitor across microcontroller VDD and GND Connect an interrupt (I used INT0 on falling edge) To +5V supply. When power ...
by Benj
Fri Feb 03, 2017 12:17 am
Jump to forum
Jump to topic

Re: Interrupt On ShutDown

Hi George, It depends what your saving but a common trick is if the value doesn't change too often then write the value to the eeprom on change. Of course if the changes are happening all the time then this is not possible. Unfortunately I don't think you can detect an impending brown out condition....