Search found 256 matches

by TimB
Wed Mar 19, 2008 11:09 pm
Forum: Compiler
Topic: Constants on eeprom ?
Replies: 5
Views: 3376

The illustration in the manual as Octal pointed you to, declares a value and that value/s is placed in eeprom at compile time EEPROM Data eeprom [(address)] = (item [as type] {, item [as type]}) Address – An optional starting address for the EEPROM data. If a starting address is omitted, data is sto...
by TimB
Sun Mar 16, 2008 9:04 pm
Forum: User Modules
Topic: Stepper Motor Module
Replies: 3
Views: 3769

Andy

Great stuff!!

What ever is posted its a help to some one. I can vouch for that as I find little snippets like that and even if the do not do exactly what I want they can be modified.
by TimB
Sun Mar 16, 2008 5:15 pm
Forum: General
Topic: Can a Led be used to measure ambiant light?
Replies: 2
Views: 2843

Its really quite simple

I put a v meter across a LED and in the dark got a low voltage and under a table lamp got 0.2v well within the range of the A/D

So when my led is off or every x mins I will to an a/d on it to determine the voltage and adjust my pwm accordingly

Cheers
by TimB
Sun Mar 16, 2008 1:06 pm
Forum: General
Topic: Can a Led be used to measure ambiant light?
Replies: 2
Views: 2843

by TimB
Sun Mar 16, 2008 1:02 pm
Forum: General
Topic: Can a Led be used to measure ambiant light?
Replies: 2
Views: 2843

Can a Led be used to measure ambiant light?

I have an app that flashs a led, trouble is in day time its to dim and at night to bright.

Now I have seen people use Leds as buttons so obviously there is some feed back in them, but can I use them as a crude ambient light sensor, so I can use it to set the brightness level?

Ta

Tim
by TimB
Wed Mar 12, 2008 3:43 pm
Forum: Compiler
Topic: Super compact 24 bit compare required
Replies: 3
Views: 2670

Well shining knight saw my post and sent me some sample code Here's a signed or unsigned equals compare of two 24-bit variables: Movf DWORDIN1,W Cpfseq DWORDIN2 Bra FALSE Movf DWORDIN1H,W Cpfseq DWORDIN2H Bra FALSE Movf DWORDIN1HH,W Cpfseq DWORDIN2HH Bra FALSE ; code goes here is comparison is true ...
by TimB
Wed Mar 12, 2008 3:04 pm
Forum: Compiler
Topic: Super compact 24 bit compare required
Replies: 3
Views: 2670

Super compact 24 bit compare required

Hi Chaps Has any one got a compact 24 bit compare in asm? I have this for a 32 bit MOVF VAR1,W,0 SUBWF VAR2,W,0 MOVF VAR1H,W,0 SUBWFB VAR2H,W,0 MOVF VAR1HH,W,0 SUBWFB VAR2HH,W,0 MOVF VAR1HHH,W,0 SUBWFB VAR2HHH,W,0 MOVF VAR1HHH,W,0 XORWF VAR2HHH,W,0 BTFSC STATUS,0,0 XORLW 128 BTFSS STATUS,4,0 BRA Exi...
by TimB
Sun Mar 09, 2008 3:44 pm
Forum: Modules
Topic: SPI and GLCD
Replies: 2
Views: 5185

There are GLCD's being used with SPI and the code is available, did you look on the Wiki?
by TimB
Sun Mar 09, 2008 2:23 pm
Forum: Compiler
Topic: New to SF a lil stuck
Replies: 3
Views: 2554

Hello maxwell

There are some reasons to use FP but there few and far between.

The rest of the time you want to use scaling and stick to integers

This one is simple,

Dim Percentage as byte
Dim ADRaw as word

Percentage = (ADRaw * 100) / 1024
by TimB
Thu Mar 06, 2008 9:13 pm
Forum: Compiler
Topic: Davinci Brain Found
Replies: 23
Views: 11360

Hi Warren

We were getting really worried! I had people trying to find contacts to call at your door we were so worried

We wish all the best and a speedy recovery.

Just rest!!
by TimB
Wed Mar 05, 2008 7:54 am
Forum: General
Topic: Swordfish Compiler for PIC24 and dsPIC30/33
Replies: 7
Views: 6659

Do you have any idea how much work it would be to develop a compiler for 18 the 24 and the 32 bit series?

I recommend you learn C then you can access all your desired devices.

BTW would expect to pay only £100 for all 3?
by TimB
Sat Mar 01, 2008 5:46 pm
Forum: Modules
Topic: KS0108 - Graphics OK, text won't display ** RESOLVED **
Replies: 15
Views: 9087

I can sim the 18f4410 in ISIS and will do so with your wiring. Give me an hour two......
by TimB
Sat Mar 01, 2008 4:53 pm
Forum: Modules
Topic: KS0108 - Graphics OK, text won't display ** RESOLVED **
Replies: 15
Views: 9087

Its the fuse settings related to PORTB A/D settings PORTB 4:0 configured as analogue on reset Nothing to do with the compilers commands although you can preset them from within the compiler but not at run time. (Fuses) I think you can change PortB at run time to digital but you wil have to read the ...
by TimB
Sat Mar 01, 2008 9:11 am
Forum: Modules
Topic: KS0108 - Graphics OK, text won't display ** RESOLVED **
Replies: 15
Views: 9087

Check your wiring and your fuse settings especially to see if portb is set to analogue I changed the code to run on a proton dev sim in ISIS and it worked correctly Device = 18F452 Clock = 20 #option GLCD_DATA = PORTD // data port #option GLCD_RS = PORTC.1 // RS pin #option GLCD_EN = PORTE.0 // EN p...
by TimB
Mon Feb 18, 2008 7:35 pm
Forum: Modules
Topic: LCD.BAS question
Replies: 1
Views: 2151

There are 2 methods to do it, timing and delays, 50/50 which one to choose but the great thing about SF is you can alter the library your self to provide both.