PDA

View Full Version : Demo version...



simransingh
- 29th October 2007, 08:46
Here I am having some doubts about demo version...

I'll be thankful if you please answer...

1. Can we use ICD Of different companies on my PIC BASIC or PIC BASIC Pro software...

2. Can I use Programmers of different companies on my PIC basic pro software...

3. Where is the compiled hex file stored when we are going to program a basic program...

Regards,

Simran..

HenrikOlsson
- 29th October 2007, 15:16
Hi,
1) I don't know...

2) You can use any programmer you want. The compiler outputs a hexfile. It does not care how that hexfile ends up inside the PIC. If you are using an IDE such as the MicroCodeStudio the programmer needs to be compatible with that if you want to use the Compile & Program feature. Otherwise, compile your program, import the .hex file in your programmer software and program the PIC.

3) When compiling, the resulting files (.lst .hex etc) ends up in the same folder as your sourcefile(s)

Don't know if it's any different with the demo-version but I guess not.

/Henrik Olsson.

damu
- 19th November 2007, 16:03
i am new to picbasic i have a code that was for picbasic but it is not running on picbasicpro demo versio please guide me for the same

------code---
symbol porta = 5
symbol trisa = 133
symbol portb = 6
symbol trisb =134
poke trisa, 255
poke trisb, 240
b0 var byte
start:

peek portb, b0
if bit4 = 0 then trigger
endif
goto start
trigger:
pause 500
peek portb, b0
if bit5 = 1 then send
endif
goto start
send:
peek porta, b0
if bit4 = 1 then eleven
poke portb,b0
endif
goto start
eleven:
if bit0 = 0 then ten
poke portb,11
endif
goto start
ten:
poke portb,10
goto start
end
-----------

please help

Archangel
- 21st November 2007, 10:04
i am new to picbasic i have a code that was for picbasic but it is not running on<font color=red> picbasicpro demo versio </font color>please guide me for the same

------code---
symbol porta = 5
symbol trisa = 133
symbol portb = 6
symbol trisb =134
poke trisa, 255
poke trisb, 240
b0 var byte
start:

peek portb, b0
if bit4 = 0 then trigger
endif
goto start
trigger:
pause 500
peek portb, b0
if bit5 = 1 then send
endif
goto start
send:
peek porta, b0
if bit4 = 1 then eleven
poke portb,b0
endif
goto start
eleven:
if bit0 = 0 then ten
poke portb,11
endif
goto start
ten:
poke portb,10
goto start
end
-----------

please help

It looks like PBasic not pro, peek and poke are a not recomenended, but still supported method. In the pro version you can control ports directly using the Port and TRIS commands.
I. E. instead of symbol porta = 5 and symbol trisa = 133 you would write TRISA = 133 or TRISA = %10000101 or TRISA = $85 and PortA = 5 or PortA=$5 or PortA=%00000101, symbol is used to alias a variable but not to create it. This is however the correct thread for PIC basic, but you need to know the pro version is different.

mister_e
- 21st November 2007, 22:10
Almost it, i think it's also caused by Bit0, bit1 etc etc. Below my suggestion



TRISA = 255
TRISB = 240
b0 var byte

start:
b0 = PORTB
if b0.4 = 0 then trigger
goto start

trigger:
pause 500
b0 = PORTB
if b0.5 = 1 then send
goto start

send:
b0 = PORTA
if b0.4 = 1 then eleven
PORTB = b0
goto start

eleven:
if b0.0 = 0 then ten
PORTB = 11
goto start

ten:
PORTB = 10
goto start
end