Hi to all!
First of all, I think this is a very interesting project.
I'm trying to begin with PIC development, but programming in assembler it's a very long task.
I would like to know if GCBASIC is compatible with 16F690 (I've just bought a PICKIT2 programmer, and it's come with a 16F690 inside).
Thanks in advance for your answer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GCBASIC should work fine with the 16F690 - if it doesn't, let me know and I'll be happy to alter it so that it does.
There are a few issues with the analog to digital converter module of the 690 in the current version of GCBASIC (0.9.0.4), but they'll be fixed within a day or two.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just tried with the classic blinking led beginner application, without success.
The source compiled succesfully, but after downloading the HEX with PICKIT2 on my demo board, nothing work.....
This is the code:
'Chip model
#chip 16F690,4
#config _INTRC_OSC_NOCLKOUT, _WDT_OFF,_PWRTE_OFF,_MCLRE_OFF,_CP_OFF, _BOR_OFF, _IESO_OFF,_FCMEN_OFF
ANSEL=0
'Main routine
DIR PORTB b'00000000' 'PORTB as output
Start:
'Turn one LED on, the other off
SET PORTC.2 ON
SET PORTC.3 OFF
wait 1 sec
'Now toggle the LEDs
SET PORTC.2 OFF
SET PORTC.3 ON
wait 1 sec
'Jump back to the start of the program
goto Start
What's going wrong?
Any answer will be welcome...
Greetings
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Found the error! Must use DIR on PORTC, not on PORTB!
This is the right code and it works too!
'A program to flash two LEDs on PORTB, bits 0 and 1
'Chip model
#chip 16F690,4
#config _INTRC_OSC_NOCLKOUT, _WDT_OFF,_PWRTE_OFF,_MCLRE_OFF,_CP_OFF, _BOR_OFF, _IESO_OFF,_FCMEN_OFF
ANSEL=0
DIR PORTC b'00000000' 'PORTB as output
'Main routine
Start:
'Turn one LED on, the other off
SET PORTC.2 ON
SET PORTC.3 OFF
wait 1 sec
'Now toggle the LEDs
SET PORTC.2 OFF
SET PORTC.3 ON
wait 1 sec
'Loop
'Jump back to the start of the program
goto Start
Many greetings
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi to all!
First of all, I think this is a very interesting project.
I'm trying to begin with PIC development, but programming in assembler it's a very long task.
I would like to know if GCBASIC is compatible with 16F690 (I've just bought a PICKIT2 programmer, and it's come with a 16F690 inside).
Thanks in advance for your answer.
GCBASIC should work fine with the 16F690 - if it doesn't, let me know and I'll be happy to alter it so that it does.
There are a few issues with the analog to digital converter module of the 690 in the current version of GCBASIC (0.9.0.4), but they'll be fixed within a day or two.
Thanks a lot for your answer...
I'll have a try in the weekend and let you know the result.
I've just tried with the classic blinking led beginner application, without success.
The source compiled succesfully, but after downloading the HEX with PICKIT2 on my demo board, nothing work.....
This is the code:
'Chip model
#chip 16F690,4
#config _INTRC_OSC_NOCLKOUT, _WDT_OFF,_PWRTE_OFF,_MCLRE_OFF,_CP_OFF, _BOR_OFF, _IESO_OFF,_FCMEN_OFF
ANSEL=0
'Main routine
DIR PORTB b'00000000' 'PORTB as output
Start:
'Turn one LED on, the other off
SET PORTC.2 ON
SET PORTC.3 OFF
wait 1 sec
'Now toggle the LEDs
SET PORTC.2 OFF
SET PORTC.3 ON
wait 1 sec
'Jump back to the start of the program
goto Start
What's going wrong?
Any answer will be welcome...
Greetings
Found the error! Must use DIR on PORTC, not on PORTB!
This is the right code and it works too!
'A program to flash two LEDs on PORTB, bits 0 and 1
'Chip model
#chip 16F690,4
#config _INTRC_OSC_NOCLKOUT, _WDT_OFF,_PWRTE_OFF,_MCLRE_OFF,_CP_OFF, _BOR_OFF, _IESO_OFF,_FCMEN_OFF
ANSEL=0
DIR PORTC b'00000000' 'PORTB as output
'Main routine
Start:
'Turn one LED on, the other off
SET PORTC.2 ON
SET PORTC.3 OFF
wait 1 sec
'Now toggle the LEDs
SET PORTC.2 OFF
SET PORTC.3 ON
wait 1 sec
'Loop
'Jump back to the start of the program
goto Start
Many greetings