I wrote a program in Picbasic Pro that stored settings in the flash for a 12f1571. I want to make a similar program in GCB because my trail period for PBP expired but get the following error when trying to compile the program:
eeprom.h (303): Error: Incorrect parameters in Set, expected: Set variable.bit status
eeprom.h (324): Error: Incorrect parameters in Set, expected: Set variable.bit status
The current program tests if it works and sends the result to the serial port (attached)
I had all the programread and write commands commentes out in search of the problem in the first post. the last one I posted is the one that gives the errors. sorry, my bad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 12f1571 is HEF capable MCU. Use the HEF library as this is intended to correctly handle HEF. This MCU has no EEPROM.
HEF is 128bytes, therefore you can use addresses 0 to 127. An example.
#chip 12f1571, 4
#option explicit ' all variables must be declared !
dim adval as word
HEFWrite (127,0x55) 'write 0x55 to HEF location 127
HEFRead (127,adval) 'read location 127 to variable.
If you have the ASM from the 'other' programming language for this MCU then I would like to see it. I think (note think) this MCU requires a memory block wrrite operation and this is implemented for HEF but not for ProgramWrite - which I guess we should support.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just so that this thead can be marked as resolved: HEF will do what I need done. I wrote to the program memmory because I did not know about HEF in general, or that chip has it in particular. You learn something new every day!
Thanks again for the help and the advice
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is optimised for space and performance, but you would need to use the accompanying initialisation etc.
The Old Software serial routines are there for backwards compatibility.
The Optimised routines should be used for new code.
The choice is yours but it is all or nothing, you shouldn't mix and match.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What a good question. Ser1Send essentially does the same as SerSend but Ser1Send can support faster communication rates, more channels, lower memory usages and a lot easier to setup.
I am sure others will chime in so give more insights but yesterday I choose Ser1Send as I wanted it to work 'out of the box' and I did not want to study the constants required to make SerSend work. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Likewise I am Using Ser3Send as I needed a port that was rarely but easily used.
if anything it is easier to set up than a USART and is perfect at 19200 Baud so far, I could probably push it higher.
I wanted PortA.0 and PortA.1 as my Tx and Rx Pins so the total initialisation code was:
#define SER3_TXPORT PORTA
#define SER3_TXPIN 0
#define SER3_RXPORT PORTA
#define SER3_RXPIN 1
#define SER3_BAUD 19200
wait 5 s ' Time to setup the terminal
Ser3Print "Hello World!"
You can't get much easier than that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wrote a program in Picbasic Pro that stored settings in the flash for a 12f1571. I want to make a similar program in GCB because my trail period for PBP expired but get the following error when trying to compile the program:
eeprom.h (303): Error: Incorrect parameters in Set, expected: Set variable.bit status
eeprom.h (324): Error: Incorrect parameters in Set, expected: Set variable.bit status
The current program tests if it works and sends the result to the serial port (attached)
tx
We should be able to help.
What version of Great Cow BASIC?
latest and greatest 0.98.05
No errors here. Please post the ASM .
here you go
seems like I posted the wrong program, sorry. this is the correct one:
I had all the programread and write commands commentes out in search of the problem in the first post. the last one I posted is the one that gives the errors. sorry, my bad
and the "serout" should be commented out, it is from PBP
The 12f1571 is HEF capable MCU. Use the HEF library as this is intended to correctly handle HEF. This MCU has no EEPROM.
HEF is 128bytes, therefore you can use addresses 0 to 127. An example.
If you have the ASM from the 'other' programming language for this MCU then I would like to see it. I think (note think) this MCU requires a memory block wrrite operation and this is implemented for HEF but not for ProgramWrite - which I guess we should support.
thanks for reply, will test HEF.
Here is program and hex
Just so that this thead can be marked as resolved: HEF will do what I need done. I wrote to the program memmory because I did not know about HEF in general, or that chip has it in particular. You learn something new every day!
Thanks again for the help and the advice
Gert,
I have a 12f1571. Serial communications on the 12F1571.
You may want this code one day. https://raw.githubusercontent.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/master/Serial_Communications_Solutions/Software_Serial_Optimised_for_Speed_and_Size/Ser1Send_12F1571.gcb
Enjoy
thanks.
how does ser1send differ from sersend?
gert
On 5/16/19, Anobium evanvennn@users.sourceforge.net wrote:
It is optimised for space and performance, but you would need to use the accompanying initialisation etc.
The Old Software serial routines are there for backwards compatibility.
The Optimised routines should be used for new code.
The choice is yours but it is all or nothing, you shouldn't mix and match.
What a good question. Ser1Send essentially does the same as SerSend but Ser1Send can support faster communication rates, more channels, lower memory usages and a lot easier to setup.
I am sure others will chime in so give more insights but yesterday I choose Ser1Send as I wanted it to work 'out of the box' and I did not want to study the constants required to make SerSend work. :-)
Likewise I am Using Ser3Send as I needed a port that was rarely but easily used.
if anything it is easier to set up than a USART and is perfect at 19200 Baud so far, I could probably push it higher.
I wanted PortA.0 and PortA.1 as my Tx and Rx Pins so the total initialisation code was:
You can't get much easier than that.