Search found 365 matches

by zkt
21 Aug 2008 19:26
Forum: mikroBasic General
Topic: Demo limit
Replies: 4
Views: 2464

Code is a lot like comedy; you either get it or you dont. Now that you`ve written it, I get it, but sure didnt see it befor. Thanks man
by zkt
21 Aug 2008 14:30
Forum: mikroBasic General
Topic: Demo limit
Replies: 4
Views: 2464

Wow, thats a lot of code to raise 2 to the power n. I reallize that the Pow function will do much more than that tho. All I need is 2 to the n. Yes , its a typo. Should be k+x. I was looking for a concise way to display adc binary result on LCD. But now that I look at the code it has several problem...
by zkt
21 Aug 2008 05:15
Forum: mikroBasic General
Topic: Demo limit
Replies: 4
Views: 2464

Demo limit

Is it possible that an error in my code has caused the demo limit to be reached ? Such a small amount of code. program F452_LCD4_ADRESL dim ch as byte dim t,b as word dim Text as char[6] dim tlong as longint dim k, x as integer main: PORTB = 0 ' clear portb TRISB = 0 ' designnate portb as output (LC...
by zkt
19 Aug 2008 16:59
Forum: mikroBasic General
Topic: Is there a summary and BASIC Syntax for port initialization?
Replies: 4
Views: 2701

You can write register bits by using setbit(registername,bit#) and clearbit(registername,bit#). Ex. setbit(adcon,7). Or writing the entire register contents in one operation. Ex. intcon =%11110110. Similarily in decimal or hex values with the proper prefix. Hex prefix is $. Dec is none. Naturally yo...
by zkt
19 Aug 2008 05:54
Forum: mikroBasic General
Topic: Is there a summary and BASIC Syntax for port initialization?
Replies: 4
Views: 2701

You must become familiar with the datasheet for the PIC you are using. The are all quite similar in general but vary in specifics. So read over your pics datasheet. It also defines the port port, tris, adcon, etc. The compiler help button leads to a summary of Mikrobasic syntax and commands. The onl...
by zkt
19 Aug 2008 05:00
Forum: mikroBasic General
Topic: LCD temp display(LM34)
Replies: 12
Views: 4681

Cant even trust Microchip. LMFAO
That does axplain why I couldnt write to the adcon2 register.
IT DOESNT EXIST.
merci beaucop MON AMIE
by zkt
19 Aug 2008 00:04
Forum: mikroBasic General
Topic: LCD temp display(LM34)
Replies: 12
Views: 4681

Do I have the wrong datasheet ? !!!
bit 3-0 PCFG3:PCFG0: A/D Port Configuration Control bits:
must be cleared to select analog 0-12.

PIC18F452
http://ww1.microchip.com/downloads/en/D ... 39631D.pdf
pg226
by zkt
18 Aug 2008 22:07
Forum: mikroBasic General
Topic: LCD temp display(LM34)
Replies: 12
Views: 4681

Thanks I`ll try to understand what you are doing. But current problem is that setting adcon1,VCFG0 bit doesnt enable pin5 voltage to serve as Vref+. And I cant write to adcon2. 18F452 Are you working on a home heating control system ? Was thinking about that as I am also considering building a hydro...
by zkt
18 Aug 2008 21:54
Forum: mikroBasic General
Topic: LCD second row blinking
Replies: 5
Views: 3329

It worked for me. :D
Is there a problem with the 8 bit version ?
by zkt
18 Aug 2008 19:56
Forum: mikroBasic General
Topic: 26:8 E-3 Identifier 'adcon2' was not declared LCD8_F452.pbas
Replies: 1
Views: 1470

26:8 E-3 Identifier 'adcon2' was not declared LCD8_F452.pbas

Why can I write to adcon2 and how to fix it ? program LCD8_F45 dim ch as byte dim t,b as word dim Text as char[6] dim tlong as longint main: PORTB = 0 ' clear portb TRISB = 0 ' designnate portb as output (LCD is connnnected to portb) intcon = 0 ' disable all innterrupts TRISd =0 ' portd out to leds ...
by zkt
18 Aug 2008 17:44
Forum: mikroBasic General
Topic: LCD temp display(LM34)
Replies: 12
Views: 4681

yes, there was a problem with the C&P. It works as it should. the 2 LSB of the 10 bit result of the adc read are still jumping around quite a bit at ambient temp. Think it would help to use 2 diodes(1.2v) as Vref rather than Vcc. also I have yet to succeed in displaying the 10 bit adc result on the ...
by zkt
18 Aug 2008 00:53
Forum: mikroBasic General
Topic: longword and longint LCD display
Replies: 1
Views: 1527

I think this might explain it.
http://en.wikipedia.org/wiki/Two's_complement
by zkt
18 Aug 2008 00:51
Forum: mikroBasic General
Topic: 3:7 E-14 Identifier "n" has been already declared
Replies: 3
Views: 2052

Explains why code ran on F16 and not on F18
Thanks
by zkt
17 Aug 2008 22:51
Forum: mikroBasic General
Topic: longword and longint LCD display
Replies: 1
Views: 1527

longword and longint LCD display

t = ADC_read(0) ' read ADC into word t with right justification ' t= %000000dddddddddd tlong = t*5000 ' Vref = 5v; if Vref= 1.2v, multiply by 1.2 ' if t= 5v then t= %0000001111111111 = 1023 ' 5000*1023= 5115000= %0000 0000 0100 1110 0000 1100 0111 1000 ' this doesnt seem right ' What is the differe...
by zkt
17 Aug 2008 21:10
Forum: mikroBasic General
Topic: 3:7 E-14 Identifier "n" has been already declared
Replies: 3
Views: 2052

3:7 E-14 Identifier "n" has been already declared

Where ? Is the compiler as confused as I am ? I changed all the variable n to nn and it compiles. program LCD8_F452 dim ch,k,n,tl,th,tv as byte dim t as word dim Text as char[16] dim tlong as longint dim t_old,t1,t2,t3,t4 as word dim x as longint[10] dim y as longint[10] dim sumx as longint dim sumy...

Go to advanced search