I'm still trying to start a project with a 16C57. Apart from the problem that setting the IO-Port seems to be impossible, I came across another problem:
In the sub-dir \chipdata, there is a file called 16c57.dat. That's fine.
in gputils\lkr, there is a file called 16c57.lkr. That's fine too.
In gputils\header, there is only a file called 16c5x.inc and here the problem starts.
When I define
#chip 16C5x, ... I get the error-message "no chipdata found..."
but if I define
#chip 16C57, ... I get the message "P16C57.inc No such file ..."
Somehow, this compiler - at least for the 16C57 - seems to be somewhat incomplete.
Or do I miss something ?
Any help welcome, maybe from the author of this program ... he should know ;-)
regards,
Reelf
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry Reelf, I've not really tried the 16x5x chips and it seems to be showing!
The trouble with the dir command was a bug, GCBASIC was looking for a TRISx register and getting upset when it couldn't find it. It now accepts that there are no TRISx registers and uses the tris command instead.
It was also using the wrong name for the assembly .inc file, as you found and as I also found very soon after fixing the other bug. This is also fixed now.
Sorry for the trouble, and thanks for being so patient! Hopefully GCBASIC will work better now.
The 12 bit instruction set chips like the 16C57 are very limited anyway - they only have 2 stack levels for example, and there are problems with goto/call instructions that jump over a 256 instruction page boundary that I haven't dealt with properly but can if needed. If you've any choice in the matter, I'd really recommend using a 14 bit chip!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In cases where the basic command does not work, you should be able to do it with inline assembly code. The assembler called by the Basic compiler may not like the 16C5X.
Why are you using an old part like the 16C57? Why not a semi-old part like the 16F84A? A newer part like a 16F887A is not expensive and will save you all these problems you are having. Besides you could use a bootloader and really make your life easier.
I use both GCbasic and Pic-Sim-Ide at www.oshonsoft.com. It
includes a Basic compiler and a simulator which, as downloaded, will
compiler 2k word code. A purchase of the full package is only 29 euro.
Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm still trying to start a project with a 16C57. Apart from the problem that setting the IO-Port seems to be impossible, I came across another problem:
In the sub-dir \chipdata, there is a file called 16c57.dat. That's fine.
in gputils\lkr, there is a file called 16c57.lkr. That's fine too.
In gputils\header, there is only a file called 16c5x.inc and here the problem starts.
When I define
#chip 16C5x, ... I get the error-message "no chipdata found..."
but if I define
#chip 16C57, ... I get the message "P16C57.inc No such file ..."
Somehow, this compiler - at least for the 16C57 - seems to be somewhat incomplete.
Or do I miss something ?
Any help welcome, maybe from the author of this program ... he should know ;-)
regards,
Reelf
Sorry Reelf, I've not really tried the 16x5x chips and it seems to be showing!
The trouble with the dir command was a bug, GCBASIC was looking for a TRISx register and getting upset when it couldn't find it. It now accepts that there are no TRISx registers and uses the tris command instead.
It was also using the wrong name for the assembly .inc file, as you found and as I also found very soon after fixing the other bug. This is also fixed now.
The update is at http://gcbasic.sourceforge.net/newfiles/update.zip or http://gcbasic.sourceforge.net/newfiles/update-nochipdata.zip depending on what chip data files you already have installed. Download the first one if your chip data files are older than 27/9/2007, otherwise download the second one.
Sorry for the trouble, and thanks for being so patient! Hopefully GCBASIC will work better now.
The 12 bit instruction set chips like the 16C57 are very limited anyway - they only have 2 stack levels for example, and there are problems with goto/call instructions that jump over a 256 instruction page boundary that I haven't dealt with properly but can if needed. If you've any choice in the matter, I'd really recommend using a 14 bit chip!
Great ! I'll give it a new try at once ! Thank you for all the good work !
regards,
Reelf
In cases where the basic command does not work, you should be able to do it with inline assembly code. The assembler called by the Basic compiler may not like the 16C5X.
Why are you using an old part like the 16C57? Why not a semi-old part like the 16F84A? A newer part like a 16F887A is not expensive and will save you all these problems you are having. Besides you could use a bootloader and really make your life easier.
I use both GCbasic and Pic-Sim-Ide at www.oshonsoft.com. It
includes a Basic compiler and a simulator which, as downloaded, will
compiler 2k word code. A purchase of the full package is only 29 euro.
Richard