----------------------------------------------------- BASCOM-AVR History (c) 1995-2007 MCS Electronics the history items are very short descriptions of changes. it is only intended to allow you to find the info in the help. ----------------------------------------------------- 1.11.8.9 - getrc5 did not worked with optional timer2 on M48/m88/m168 - the internal dat file checker was enhanced to check for some other potential problems(like constant with same name as register) - simulator did not work for extended ports(port that have a higher location that fit into a byte). especial simualtion LCD connected to a high port (portH or PORTL) did not work. - enable/disable will show all interrupts, depending on the used chip - support for AT90PWM2 and AT90PWM3 added.(some advanced features are not yet supported with a high level basic command) Note that PWM2 and PWM3 chips have the same ID. So we have 1 dat file that you can use for all chips. The PWM2 is the same as PWM3 but with only 24 pins. Look at the at90pwm2_3.bas sample. - Getadc() will set adcsrb.mux5 bit for channel>7 on m2560, m1280. - PDF can be used on dual/virtual monitors. The window is repainted correctly. - ADR Label will create label data ADR2 Label will create label data multiplied by 2, needed to get the address in memory since word addresses are used These are ASM mnemonics. DATAPTR can be used to read the address: Restore Label Read DATAPTR ' read 2 bytes and assign to internal datapointer R8/R9 Read B ' read a byte End Label: ! ADR2 Testlabel nop testlabel: data 10,20 This sample will first set the datapointer to address of LABEL Then the ADR2 data will be read which points to testlabel The next READ will thus read from label testlabel 1.11.8.8 - 1wire did not work on extended ports with addres> &HFF. When the lib was written there were no high ports. The mcs.lib has been changed and when a port is used with high address, the internal constant _1WEXT is set to 1. The mcs.lib checks this constant wether to set R31 to 0 or not. It does mean however that when you use a port with extended address, all 1wire routines should work with extended address. For example PORTL is extended register. You can not mix 1wire on PORTL and PORTB. While the compiler could also pass the R31 value each time it saves code to set the register in the lib. But it has the described limitation that you can now work with boht normal and extended regs. - Proggy programmer support added. - Started localization of the IDE. See options IDE to change the language. - some of the dat file had a double entry for WGM01. This value had the wrong value. - sht11.bas sample from Helmut Hoerschgl added that shows how to use the SHT11 with crc checksum. - Simulator, COM port for simulation can be different then terminal emulator com port. Specify the COM port in Options, Simulator. Previous it would use the same COM port as the terminal emulator. - IDE search is changed into cycled search. Hotkeys added to indent,unindent, remark Dropdown label and sub search will put the found item on top in the editor And the jump color was changed into red again. The green was an error from the conversion from D5 to D7. - added tiny861.dat file with sample in chips dir. - tcpchecksum supports 2 additional/optional word params. This way it can be used in all UDP/TCP related checksums. w=tcpchecksum(array(start), bytes [,w1] [,w2]) - ip_checksum.bas added to Samples\TCP dir. It demonstrates tcpchecksum. - added option to simulator to invert leds. - the new color grid option in the simulator had a bug : you could not manual edit the register and memory window. - ALIAS : added a check for alias with arrays. An alias can not be an array. ar(10) alias portd.0 is NOT ALLOWED. The alias must be a name without (). - dat files M48 and M88 had a wrong INT vector offset. - Pinout XML files for Mega161, Mega162,4414,4434,M165,M169,90SCAN added - single.lbx for scientific notation was not recompiled. - vartest("test") added for conditional compilation. This will test if a constant exist and then perform the test. exampele : #IF vartest("myconstz>10") This will test if myconstZ > 10. The test will return false in case the constant does not exist. It will NOT give an error. So the advantage is that you can test for a constant and get no error when it exists. But the disadvantage is that when you test for a constant and you make an typing error, it will result in 0, and no error will be reported. 1.11.8.7 Small additions to 1.11.8.6 - config dcf77 has additional sectic parameter. the lib source is added to the commercial version too. - Mega1281 dat file added - m168 dat file did not had tccr2 defined. config clock needs it. - tcpchecksum() function did not work for big data since a word was used to add, and not a long. the function was written for the PING which did not need a lot of data. but now it will work for other data as well. - the tcp lib had a problem for the slave address of the iim7010.it only worked with &H80 since a constant was not replaced by the internal slave constant. - the m2561 dat file missed an interrupt and it caused a number of interrupts not to work. - the config serialin1/2/3 was not well described in the help. further, the samples were adusted since the following label names were changed : Serial3ByteReceived into Serial2ByteReceived Serial4ByteReceived into Serial3ByteReceived Serial3CharMatch into Serial2CharMatch Serial4CharMatch into Serial3CharMatch This makes the label names more consistent with the uart names. When your code uses the BYTEMATCH option, it is important that you change it !!! 1.11.8.6 - M164P added , attiny461 added. - programmer: auto program will test the lock and fusebits when $prog is used when a fuse is wrong/bad programmed, you get an error message. - programmer, hex values of lock and fusebits are shown in the category - DCF77TIMEZONE function added. - simulator can use serial input from serial port too. Previous it only could send data to the serial port. Now you can use real serial input in the simulator. - terminal emu, cursor pos is reset when it is cleared. - pdf has a problem with dual monitor. this issue is NOT addressed yet. - PDF : index can be hidden to get more screen space - CLoseSocket has a new optional param. : CloseSocket socket, prm Prm can have bit 0 and/or bit 1 set. Value : 1 - wait until all data is sent by the chip 2 - wait until we get status $18 or $8 from the chip 3 - this combines the above 2 options. *** Note that by default, both conditions are checked.*** so when you specify a value of 3, it would be the same as not using the optional parameter. - Pinout viewer had a bug in loading wrong xml file, in case the path had an embedded space. - the recent addition of [intlist] caused a lot of unforseen problems. When all sample would have been tested, we would have found this problem. Since it is a major job to test them all, and the estimated impact was very low, random samples were tested. This is not considered good practice and for this reason we implemented a great idea from Luciano : the batch compiler. Under tools(you might need to add a button yourself) you find this new option. It allows to compile a number of files automatic. Some files are include files which should not be compiled as a main program and for this reason, have a look at the next new option. - $nocomp will not compile a source file. for example an include file. this prevent compiling include files which are not project main files. - added option to play sound/wav after compilation - sim IO-registers are sorted. - simulator A/D uses steps of 1 instead of 10. - WATCHDOG was not recognized any longer. Watchdog is a virtual name for WDT. WATCHDOG has been added to the dat files. A typical entry looks like : WDT. You can add multiple names : WDT@WATCHDOG - enable serial/disable serial did not work anymore with the new intlist section. this because enable serial in fact will set 2 bits. it is added again. - tiny2313 dat file had an error in the intlist section with a double timer name. all dat files were checked again for errors. - extended stk500 can also use USB. (just like the normal stk500) - some dialog windows have an option 'do not show again'. For example when you compile while you are simulating, this will stop the simulation. you might want to get this warning. but others might not want this warning and click the 'do not show again'. The Options, IDE, has a button to reset it. - Pinout viewer can zoom in and out now. when you double click a pin, the color is changed into green. this way you can find the pin back later more easy. - A double click on the chip will show a window with the specific chip properties - Pinout viewer enhanced with 'cheap search' so you can search for a chip with certain properties. such as 2 uarts. - good news for most users from Europe. The DCF-77 atom clock synchronized signal can be decoded. the result of research and hard work from Josef Vögel. The CONFIG DCF77 in the help will show which versatile options you have. The DCF signal is not available worldwide. - tcp/ip UDP write wait on CSEND status. This is according to Wiznet API. But when the network cable is disconnected, it will wait for ever. You can provide optional timeout. See the PING_TWI Sample. - simulator, register,memory and IO window rewritten. It will color now as following: stop : black, red : memory changed, blue, memory was changed at some point. - ISP programmer window did not resize correctly - the new handling of CONFIG INT and CONFIG XRAM introduced a bug: when using the second time, the bits were not cleared. - dat files check. and fusebit sections updated - Simulator status will be shown in main window, the register,IO and memory windows are dockable. When you compile and the sim is running, you will get a warning. - The M128 dat file had an error in the int-section. THis resulted in wrong RX-enable bit set. Other chips with same problem : m32,m128can,m48,m88,m168,m16,m165 - USB-ISP programmer had a problem with programming the last page. - wrong version of glcd.lib was in the distribution. causing T6963C displays not to work - when using INPUT with UART4, the wrong code was referenced, resulting in a label not found error. 1.11.8.5 second - New PDF viewer had a problem when no PDF was opened it kept on processing messages. 1.11.8.5 - UART0 has a new option for the INPUT behaviour. Config Input0 = CR|LF|CRLF|LFCR , Echo = CR|LF|CRLF|LFCR The first option determines which character is used to end the INPUT. Default is CR The second option determines what is echoed back to the terminal. Default is CRLF. Of course when NOECHO option is used, there is no echo. A sample you find in the M324P.bas sample. NOTE : THIS works only for UART0. When we get positive feedback about this opion it will be added to other UARTS as well - CONFIG XRAM = mode [ , WaitstateLS=wls , WaitStateHS=whs ] mode : enabled/disabled , wls depends on chip. 0-3 for most new chips. This replaces $XA and $WAITSTATE directive to support new chips. While $XA and $WAITSTATE still work, they will be removed in the future since CONFIG XRAM does the same and more. - buffered serial input wil set ERR variable if an overflow occurs. while CTS/RTS checked for the buffersize, normal buffered input did not ! This could lead to sync. problems since _rs_bufcountRx was updated. When a char does not fit into the buffer, it will be read from the UDR register but it is gone. When it is important not to loose data, you should use CTS/RTS. - mega1280 added. - bootloader updated with new chips. - serial buffered bug for m25xx fixed. - M624P support added. - CONFIG ADC also supports : INTERNAL_1.1 and INTERNAL_2.56 for the reference. - constants defined by atmel, are colored different in the IDE now. - stk500 extended interface supports newer AVR Studio - Added internal PDF viewer. - Help About has link to settings file - Report shows EEPROM Code map when using ERAM variable with DATA lines. - DAT files renamed : at12def.dat into attiny12.dat at15def.dat into attiny15.dat at22def.dat into attiny22.dat at26def.dat into attiny26.dat When you source uses $regfile, you have to change the datfilename. Since your old DAT file will not be removed, your source will compile ok but you can not use the new features then. - DIM AT can have an index for arrays too : dim ar(10) as string * 10 dim var as byte at x(2) overlay - The simulator had a problem with determining the V-flag (signed overflow flag) - registers and ASM are shown in capital - comment is no longer reformatted - tiny85 added. - In order to support new chips, it was always needed to make some modifications to the compiler. The goal for this release was to put all dependencies from the source code to the dat files. This makes it simpler to support new chips. And you can do it even yourself. Of course some chips require special support (like USB, CAN) Impact for statements using new DAT files : ENABLE, DISABLE, ON .. INT With impact we mean that even while we tested the new features, a bug might be introduced. - [INTLIST] section added to dat files. When this list exist in the dat file, it is used. Otherwise internal code is used. - Mega325 support added. M325.bas sample file added. - SWAP with 2 longs had a bug since it used the wrong registers for the swap - dat file of tiny2313 revised. - clear serialout0 code had a bug : a type error in the register name resulted in a wrong returned value. this has no effect on the serial buffered code but when you check the value of the buffer in your code, it would not function correct. - extended registers with address >FF were not handled correct in comparions: if PINK.0 = 1 then would fail since the upper register was cleared and not loaded with the MSB of the extended address. - $include is not aligned left anymore when a line is reformatted - Mega329 support added - base64encoder, the last byte was not properly encoded. fixed. - bootloader.bas sample enhanced to support new chips like m2560, m329 - M644def.dat : Old compatible SPI register names added. CONFIG SPI=Hard would give an error otherwise pcint2 changed into pcint3 (type error) - mcsbyteint.lib had a potential problem in the num->string conversion. The wrong register was cleared. - New Serial buffers had a problem when used with other interrupts. The int. would cause the buffer routine to use a wrong counter value in some cases. A hard to find problem since it was hard to reproduce. - adc_int.bas sample changed. the FREE mode must be used for the ints. - format() function had a bug when assigning the same string as the source. - For COM2,Com3,COM4 it is important that you use : Config COMx This will setup the UART register(s). - 90sCAN def file updated. - added support for inputbin/printbin, and other missing code for uart3 and uart4 such as rs485 support for uart3 and uart4, bufspace(). - second uart inkey/waitkey code had a bug. - load timer did not wrote the MSB first for 16 bit timers. This can cause a wrong load of the timer since 16 bit regs must be written with MSB first. - reworked the uarts. each uart is defined by a model number in the dat file model 0: basic uart, with UDR,USR and UCR registers ,ubrr=0-255 model 1 : basic uart with udr and MP mode, ucsra, ucsrb, ubrr=0-4095 model 2 : extended uart with ucsra, ucsrb,ucsrc, ubrr=0-4095, own registers (non shared) model 3 : extended uart with ucsra,ucsrb,ucrsc, ubrr=0-4095,shared register for setting UBRH / UCSRC model 4 : extended uart with ucrsra,ucsrb and both uarts share the same ubrH register for the upper 4 bits model 5 : extended register with own registers and optional SPI mode. When you define your own dat files, you need to add the model. Most new chips will be model 5. - CLEAR xxx had a bug. the pointer in buf_clear was not increased resulting in not clearin tail and counter variables. - CONFIG COM syntax support setting of BAUD. - toggle for bits improved. - the single.lbx alternative LIB had a problem with large negative numbers. And CONST -3e-15 was not proper evaluated. - tiny44 and tiny84 support added - simulator did not simulate reception of char right for chips with extended usr/udr registers - CONFIG TIMER0 created wrong init code for some chips. (timer 0 comes in different flavors). in the near feature new support for timers will be added which should make it easier. - EDB sample files added to distribution - USB programmer had a problem sometimes programming an EEPROM. fixed. - INTS for simulation added to m2560,m2561,tiny24 - mega2560 support added. All 4 UARTS are supported. See sample under CHIPS dir. - added tiny24 support 1.11.8.3 - when you open 'read only' files you get a warning and it is not possible to save the file under the same name. - support for EA-DOG LCD's. See EADOG-M163.bas sample. - tcp/ip readtcp, help changed. readtcp() returns a status byte, not the number of received bytes. - tcpchecksum() function added - bootloader sample added for using the second uart - config print|print0 fixed. the flag was not reset so after first char, the level was changed too soon. - $timeout is also implemented for UART1 now. SO $timeout work onboth UART0 and UART1. - USB programmer switch for stk500 and similar added. You need to use stk500 programmer to use this option. It will add -cUSBserial instead of using the COM port. - DEBUG statement added - color LCD display support added - Mega2561 support added - Mega165 support added - the help file(HTML) is no longer a 'stay on top' window. - M16def.dat file modified(i2c pins added) - serial buffers modified. CLEAR command added to clear buffers. - CTS/RTS support added - mega16 prescale 64 was not in the old datasheet for timer 0. new datasheet show 64 instead of 32. so the compiler has been changed too. - get/put added for HW UART - base64encoder routine had a bug which resulted in wrong conversion in some cases(depends on the used input) - new single-> asc conversion lib this allows output in scientific notation : 12.2E15 for example To override the default routine and use scientific notation use : CONFIG SINGLE=SCIENTIFIC , DIGITS= 0|7 The value of digits param must be 0 (no trailing zeros), 1-7 for number of digits behind comma See single_scientific.bas sample. LIB written by Josef Vögel. - problem with for..next with words fixed. - baud rate check did also checked non-UART chips such as tiny26. Fixed. - CONFIG TWISLAVE has new optional paramter : SAVE=NOSAVE | SAVE= SAVE=NOSAVE can be used when you use asm in your slave interrupts. SAVE= can be used when you use basic inside the slave interrupt. 1.11.8.2 - the bufspace() parameter did not match the docs. the compiler has been changed to match the docs. (previous , 0 was bufout0, 1, was bufout 1, 2 wsa bufin0, and 3 was bufin1 - the revised code for .. next code did not work correct with local byte/word and in combination with 'optimize'. - Help, IDE, Forum did not go to the forum. - Help, Knowledge Base : selecting cancel also executed the browser. - new MEMCOPY() function to copy blocks of bytes with optional increase if source/target * BASCOM will fail on XP 64 bit edition. This is identified. Support for XP 64 will be made available in 1.11.8.3 - automatic conversion SBIS,SBIC, SBI and CBI did not work correct for address >$1F this resulted for example in SPI not working for M168. - fonteditor plugin updated to support bigger fonts 1.11.8.1 (special build : 1.11.8.1.002) - mcs.lib was not compiled to lbx. -IDE has hard to see support icon -most important and reason for update of compiler: RESTORE for Mega128 (or other chips with more then 64KB and using more then 64KB still had a flaw, or better a new bug caused by the fix). 1.11.8.1 - by default HTML Help is selected now for a new install. - you can send a question to the KB from the help menu. it will use your default browser. - when a fusebit is changed, the WRITE FS/LB etc. can be clicked. when no changes are made they will remain disabled. - the TAB key did not result in an editor TAB but normal TAB. - the Lookup() function is used in the datetime lib but did not reflected the changes for big table lookup - SNTP() function added to TCPIP. Based on Ben Zijlsta's and Josef Vögel code. - CONFIG TCPIP extended to support TWI/I2C mode. - Added bufspace(3) for second UART - Adding a lib multiple times results in a warning and the lib will be ignored. - Added Varexist( "varname") to compiler directive This way you can execute code depending on the existence(DIMMED) of a variable #IF varexist("S") 'something #ENDIF - BETA : Added SETTCPREGS and GETTCPREGS for setting/getting registers from the w3100 You can set time out or retry register this way for example settcpregs $93,w,2 ' $93 is MSB of timeout, W is a word variable, 2 is 2 bytes to write w=gettcpregs(&H93,2) ' get 2 registers from W3100 and store in variable W Note that you need to specify the MS byte of the address without the baseaddress offset. For example IRTS register is located in $92 and $93. You specify the highest address then. - M644 : ADC reference has INTERNAL_1.1 and INTERNAL_2.56 for the REFERENCE paramter Also fixed wrong timer register references - internal optimise function checkLDS() did not checked for arrays. So when you left away the index in an IF condition you did not got an error message. - loadlabel : rampz will be 1 for M128 when the address > 64 KB - bootloader.bas for m64/m128 and other chips with 128 page size had a problem. The last page was not written. The loader is changed and the upload loader has been revised too. - tiny13.dat file tccr0 register had wrong address. - read/write had a problem for M128 when between reads, the rampz register was altered by the user or the program. As RESTORE/READ will store a pointer in R8/R9, and M128 needs RAMPZ too for big programs where data can cross the 64K boundery. a byte from SRAM was taken to add it to the R8/R9 pointer. the code was placed in a subroutine saving code space for succesive calls. - getattr() for AVR-DOS fixed for empty param - for..next with bytes with step > 1 failed 1.11.8.0 $PROGRAMMER option added to specify programmer $XA added (xram access) - base64ENC function added to code a string in BASE64 - Added MakeTCP() function to convert data into an IP number Simple form : Zz = Maketcp(192.168.0.6) With var and numeric data : Zz = Maketcp(192 , 168 , 0 , B4) And you can reverse the order with an additional param : Zz = Maketcp(b4 , 9 , 168 , 192 , 1) - tiny25 and tiny45 dat files fixed : the chip does not support HW MUL - M169 also support soft CLOCK mode now - simulator input test file .SI documented Showin Hex option also added to help. - $loadersize = 1024 new option for $loader so you can specify in your program how much space the loader uses otherwise loader space could be overwritten. this is for usage with external programmers See also new setting in bootloader(programmer options) - config clockdiv=1|2|4|8|16|32|64|128|256 this is a new option only valid for newer chips with CLKPR register It will divide the clock frequency. - Min() for bytes did not work as it started with 0 and never found a smaller value - all files that are open when closed, will be loaded upon the next start. - simulator did not simulate adc for M48/M88/M168 - SENDSCANKBD accepts a variable or constant also. Previous it only accepted a label. - improved MUL16 routine for HW mul. This is placed into mcslib also. Also new is Hardware Mul for Long multiplication. Credits to Josef. Not only the code will be reduced by using HW MUL(when the chip supports it) but the code will execute quicker too. - RS485 did not want until transmission was completed. Now the code will wait for TXC complete. - pcint sample added (PCINT_CHANGE.BAS) - extended I2C support added. This is an add on lib so you can use i2c on portF of a m64/m128 the lib is only provided with the full version - tiny13 timer0 fixed. the wrong timer model was used. - PRINTBIN does not print arrays() > 256. A new option allows to print larger arrays. Config Printbin = Extended As it will generate more code, (word index instead of byte index) use it only when you need to print big arrays with PRINTBIN - $regfile lists all dat files in the editor. - M48,M88,M168,M32 def files fusebits tables updated - DEFDBL added - Hex(),READ,RESTORE supports double too. - LOADWordADR added. This loads Z and RAMPZ. Usage : LoadWordAdr LABEL - bytematch added to buffered serial input - Lookupstr() usesd _lpmbyte now for 64K boundery check All other code using ELPM/LPM was changed to use _LPMBYTE too. - Lookdown() for integer/word resulted in offset error for LDD. - $LOADER support - SPLIT() function added Bcount = Split( "this is a test" , Ar(1) , " ") It will split a string into elements - varptr() can be used in CONST to get the address of a variable : CONST xx = varptr("varname") ' get address of the variable - BIN2GREY renamed to BIN2GRAY, and GREY2BIN renamed to GRAY2BIN. - all register names are shown in proper color now when you use $REGFILE - AVR-DOS, Creating file and Directory also fill the creation date/time field in Directory Double read and write (GET, PUT) in ASCII and Binary were added by Josef. INPUT and PRINT can work with the DOUBLE in AVR-DOS - When you DIM a DOUBLE, the double.lbx is added automatic. - GetADC() routine in lib fixed for M48, M88, M168. The config was not preserved. - All i2c code (soft and twi) , master and slave , were re-tested. twi master and slave code is improved. - Getadc() in free running mode, needs the following command : SET ADCSR.6 in order to work. It depends on the chip. 1.11.7.9 - support for AtTINY25 and atTINY45 added. - TWI lib changed. Interrupt bit is not set as it does not use an ISR to service the int. - SHIFT+F4 resets the chip for most programmers. - PageDelay added for custom page delay. Edit the bascavr.ini file like this : --look for section [PROGRAMMER] -- add PAGEDELAY=20 The default is 30. When you do not add anything, 30 will be used. This is an advanced option that allow you to experiment with the page delay. - RC5SENDEXT added. this will send Extended RC5 code. The TOGGLE byte must contain the the extended code AND the MS bit must be set. TOGBIT = &B1110_0000 'toggle bit set and leading bit is 1, bank 1 selected(normal RC5). TOGBIT = &B1010_0000 'toggle bit set and leading bit is 1, bank 0 selected(exstended RC5) . Rc5sendEXT Togbit , Address , Command - M168 dat file fixed. pagesize was wrong leading to error in programming. - simulator fixed. a double word instruction after sbrc was not in all cases executed. this resulted in displaying wrong double values. - config int =change did set wrong bits for M8,M48,M88,M168. - SQR() for double added. 1.11.7.8 NOTE : 30 - 6 - 2005 MCS is celibrating 10 year of BASCOM. We are expanding business and changing a number of things you will notice in the future. One thing is that there will be more frequent updates. There is never a good moment to release as we want to put in as much as possible. This release is only there to fix some M48 and M88 issues and to release the M168 def file. There will be a release each end of the week with at least 1 new atmel chip. This release also has no HELP update. THis is due to the fact that we are converting the help to a new Help system The new help and manuals will be released within 1-2 weeks. - Support for a new USB programmer has been added. This USB programmer is currently still under test, and avaialble soon from our webshop. - M168def.dat file added. Not tested with a real chip. - M48-88-168-PWM.BAS sample added for showing using 6 PWM channels - conditional compilation with #IF did not worked correct with nesting - Watchdog simulation improved. - CONFIG INT, also supports CHANGE now : CONFIG INT1=CHANGE ' to trigger on a change of the input level - Added support for AVR-DOS 5 : GETATTR, MKDIR, CHDIR, RMDIR, MKDIR, NAME AS AVR-DOS is an add on product, the LBX is free for personal use. The LIB source can be purchased from Josef. - Added double TRIG functions SIN, COS, TAN, ASIN, ACOS, ATN, ATN2, COSH, SINH,TANH, POWER,EXP,LOG,LOG10,RAD2DEG,DEG2RAD The Double TRIG LIB is written by Josef Franz Vögel - $initmicro was called at the wrong moment. On Mega chips, this would give problems as the interrupt address 2 was used too. - Serial output buffer for the second UART(COM2) also uses improved buffered code. Bufspace(1) returns the amount of free space in the output buffer for COM2. Bufspace(0) returns the amount of free space in the output buffer for COM1. - CONFIG PRINT and CONFIG PRINT1 added for RS485 CONFIG PRINT0 = PORTB.1 , MODE=SET|RESET ' will make PORTB.1 high while printing and if SET is specified ^^^ UART0. Use CONFIG PRINT1 for the second UART - $notypecheck abd $typecheck added to pass custom data in subroutines - min/max function for WORDS fixed. The wrong pointer value was loaded. - CONFIG LCD, enhanced with param : CONFIG LCD = 16*2 , CHIPSET=KS077 ^^ new option - CONFIG SERVO enhanced with selectable TIMER0 or TIMER1. - demo version fixed , it could not compile up to 4KB - simulator supports sbrs/sbrc correct after double word instructions lookup.bas sample added: lookupStr() can use >255 entries now m103def.dat file changed : this micro has NO HW mul unit/instruction 1.11.7.7 RELEASE Same release but with EXE unshrinked. Shrinking the exe caused problems at some OS/PC. Also right i2c.lib version 1.11.7.7b as the wrong version was distributed. 1.11.7.7 RELEASE - Bufspace() function added. this will return the space left in the serial buffer. implemented only for serial output buffer 0. var = bufspace(0) ' 0 for output buffer 0 Use in combination with buffered serial output. - Added directives $HWSTACK, $SWSTACK and $FRAMESIZE. - increased string constant space("text") - new introduced Encoder function had bug, fixed. - buffered serial output had a problem. it did not sent all the data from the buffer when the data was full. the fix, needs some more code so your program will get a bit longer. It does work very reliable now. When the buffer is full, the data is not written. 1.11.7.6 BETA - interface has XP look now as the menu looked strange on XP. - double1.bas and double2.bas samples added. When you did not noticed yet, the DOUBLE is a great extension written by Josef Franz Vögel. Ok, you need 8 bytes to store each double, but you get the ability to crunch huge numbers with the range from ~ E-308 to ~ E308 - m88.bas files added with m88 def file. - assigning a byte from an integer array with a constant : byte=integer(2) would assign not the LSB of the integer to the byte - $external _spiin will bind in spiIN routine. $external _SPIOUT will bind in spiout code - added Link in IDE to MCS Forum and MCS Shop. - osccal will return multiple osccal settings in the programmer interface when the chip supports it - mega48.bas sample added - added getadc() second optional parameter to specify offset for GAIN, differential input etc. - tiny26 timer1 configuration fixed(timer1 in tiny26 differs from the normal timer1) - added M128CAN dat file. tested with programmer. - Added replace button to the toolbar - Added Editor option to insert/remove code remark ' - Added number of free bytes to the report - Version() supports new param : version(1) will create dd-mm-yyyy format while version(0) or version() will create mm-dd-yyyy format - problem with extended ports fixed - auto update removed from IDE. Use update wizzard. - selecting dat file from Options, Compiler did not work anymore - using OPEN with SW UART on portG was not supported. 1.11.7.5 BETA - added TWI master replacement library, see TWI-master.bas sample - Mega169 ButterFly LCD driver added.(lcd_butterfly.lib) - ASCII tool allows to lookup and insert ASCII chars. Press the Right mouse button in the editor to show the ASCII insert window. - CONFIG PORTx, bug fixed when providing multiple values. - Min() and MAx() added for byte arrays - Watchdog simulation added to the simulator. - SBIC is transformed into LDS + SBRC automatic for IO registers with address> &H31 (R0 is used) - SBIS is transformed into LDS + SBRS automatic for IO registers with address> &H31 (r0 is used) - SBI is transformed into LDS + SBR + STS for IO registers with address > &H31 (r23 is used) - CBI is transformed into LDS + CBR + STS for IO registers with address > &H31 (r23 is used) These transformations will ensure that old code will work on the new (extended) registers. - CRC32 function added. - New Encoder function added for using rotary encoders - $INITMICRO added to add user code at startup _init_micro: is called - CPSE instruction was not simulated correct for the entire range of object codes. - VERSION() function added that shows date and time of compilation. Intended usage is to get a unique version number - BITS() and NBITS() added - SONYSEND has new additional param to sepcify number of bits SONYSEND LONG, 12 | 15 | 20 The data to send must be of type LONG in that case. Number of bits must be 12, 15 or 20. - DIM AT option can use offset too: DIM var AS BYTE AT varX + 1 OVERLAY ^--- offset - ADCD word variable is ADCL + ADCH so you can read/write simple to the data registers of the A/D converter - copy , paste and logging added to the simulator RS-232 area. - PUSHALL/POPALL and the interrupt routines do not save/restore R8/R9 registers anymore. R8/R9 are used as datapointer by READ/RESTORE - val() for string -> single will eat all leading space : s=" 123" . will be converted ok. - A warning is added to the report when STR() is used on a single and the target string is too small. For example you can dim astr as string * 4. And use : astr=str(x) . Since the result might not fit into astr, you overwrite memory. - WRITEEEPROM will disable interrupts. And enable them when complete. - Bookmarks are saved in .BM file and loaded automatic. - STK500 programmer will optional verify - baud #1, 9600 did not work for the software uart when the chip had no HW UART. - LCD 20*4A which uses special KS chip, is initialised now in extended function mode. - Added $TIMEOUT support for serial channel 0. $TIMEOUT = 100000 ' will wait relatively time. Basicly the timeout is a long that is counting down. - Fixed SERIN statement. Multiple bytes were not handled. - KS0108 driver added for 128*64 graph display. See ks108.bas sample - Programmer can write $PROG to the editor. - New GETATKBDRAW() function. This will return a byte from the keyboard and this is the SCAN code. 1.11.7.4 RELEASE (Special build 1.11.7.4.002) - Mega162 support added - mega8515 and mega8535 jump error solved. - lcd 20*4A added. Address starts at $00,$20,$40,$60 - support for 86rf401 added - IP2STR(ipnum) function added to convert IP number into a string. - $INC label , size|nosize , "file.txt" This directive will bind in any file. It will insert the label, optional the size, and the file content 1.11.7.4 BETA - X10SEND is extended with optional bytes/data to send. - $PROG lb,fuse,fusehig,fuseExtended This will automatic program the fusebits with auto program. See help for more info. - SETTCP statement added. - Problem with UDP fixed. - DHCP sample added. Written by Atilio Mosca. - new plugin added for showing bmp files. - color printing is changed to B&W due to some problems. Color support will be added again later. - The demo version can use the code optmisation too now. - New Loader(programmer) for Lawicel STAVER. - New communication control saxcomm7.ocx , replaces mhcomm32.ocx. VT220 terminal emulation removed. - MULS,MULSU, FMUl,FMULS and FMULSU menmonics added - 1200def.dat file added for the 90s1200. Only programming is supported. And of course asm programming. Programming did not work on a STK200. - A complete FILE System : AVR-DOS is now supported. Josef Franz Vögel wrote the complete libary that is now integrated in the compiler. A great piece of work. Since you can rewrite the driver, you can use it not only with CF-cards, but also with XRAM(for simulation) or write a driver for a serial eeprom. - the AVR ISP programmer settings can be changed. Edit bascavr.ini and add the section [AVRISP] then add : COM=19200,n,8,1 This is the default. When you made your own dongle, you can increase the baud rate - programmer from www.elm-chan.org/works/avrx added to Universal Interface - LCDCONTRAST value value must be a value from 0-3. This will set the contrast on some text LCD's. Will not work with all lcd display. Noritake display should work. - Added support for the MEGA8515 and MEGA8535. - OVERLAY has a new option to specify the name of a variable instead of an address: dim w as word at &H64 Dim B1 as BYTE AT W OVERLAY ' this will place the byte at the same address as variable W - CONFIG ACI=ON|OFF, COMPARE=ON|OFF , TRIGGER = TOGGLE|RISING|FALLING The TRIGGER param was not right documented. The param is TOGGLE, RISING or FALLING. - Bootm8.bas bootloader added. Sample for the M8, written by David Moran. - MOVW added to simulator and internal assembler. Usage : movw r0,r12 ; copy r12 to r0 and r13 to r1 The W is for WORD since it copies to registers 1.11.7.3 - X10SEND command added to send X10 commands with TW-523 - Mouse and AT keyboard emulator libraries available. - W3100A chip supported with TCP/IP and UDP 1.11.7.2 - Getadc() performs 1 conversion instead of 2. Use a dummy read in your program when the first result of getadc() gives a bad output. The first conversion might give a wrong result. For this reason the previous versions performed 2 conversions. But this will take additional time. For this reason, only 1 conversion is now performed. - T6963C 160*48 display added. - You can add _ at the end of a line to indicate that the line will be continued on the next line. For example : print "this is a test" _ print " this is part of the previous line" Note that no characters may be plaed after _ , only spaces. - DateTime.lib added. This library is written by Josef Franz Vögel. It extends the build in soft clock routines. Look in help under ASM libraries, DATTIME. Also dateTime_test1.bas sample added. - CONFIG I2CSLAVE has new options: config i2cslave = address, INT = INT0, TIMER= TIMER0 'By default timer0 and INT0 are used. When you change the timer and/or int, you need to change the library code too. - Supported programmer can be run manual by selecting Program from the menu. - M16 support tested with sample chips. M16.bas file added. - added optional check for ON value GOTO/GOSUB When you give the last parameter the name CHECK, the compiler will check the value against the number of supplied labels. When you use ON value GOSUB l1,l2 and value is 10 there are not enough labels and there will be a stack overflow. When you use ON value GOSUB l1,l2,CHECK the compiler will chack and find there are only 2 labels. Values less then 2(in this sample) will not be executed so the line after ON value .. is executed. - CONFIG KBD has an additional parameter : DELAY = value This additional delay causes a delay in mS after the routine has finished. The added standard 100 mS delay is removed because it was incompatible with previous released. To get the delay again use the additional parameter : delay = 100 - CONFIG ACI=ON|OFF, COMPARE=ON|OFF : added : TRIGGER = TOGGLE|RISING|FALLING config aci=on|off, compare=on|off, trigger=TOGGLE|rising|falling - support added for M32 - lockbit programming added for serial programmer - ISP programming can program faster now. Use a small number for port delay like 0.1 or 0.01 for faster programming. - LIB compiler gives a meaningfull line number in the ERR file now. - New IsCharWaiting() function did not work in combination with buffered serial input. - Support for M64 added, not tested(no sample chips available yet) - $boot option info: when you use $boot = FE00 it points to a word address. So the binary address will be multiplied by 2 : 1FC00 - New HW mul routine destroyed r0 which was used for the sign : signed integer muls resulted in an error 1.11.7.0 - showpic gave error 5 for T6963C displays caused by new SED support. - support for (asm) 0b011 resulted in problem for &H0B, &HB worked. - simulator keypad was invisible - support for {xxx} characters failed. - added CONFIG DATE = DMY|MDY|YMD, SEPARATOR = /.- Will be used for date/time library functions 1.11.6.9 - LCD can be used in 8 bit PINMODe too : config LCD = PIN, PORT=PORTB, E = PORTD.2, RS=PORTD.3 - config INTx=CHANGE added. This only works for newer MEGA chips that can trigger on a change of the input level. - simple STK500 programmer programs EEP file too. Use $eepromhex to generate Intel Hex EEP files. - LCD in pin mode supports 8 bits : CONFIG LCDPIN = PIN, PORT=PORTB, RS=pin, E = pin - IsCharWaiting() function added to detect if a serial char is waiting !!!! ERR bit is not set anymore with INKEY. Use Ischarwaiting now to detect the presense of a char - Added RC6SEND. Works the same as RC5SEND but uses RC6 mode 0 protocol. THe address and command are both 8 bits. - Multiply for bytes and words use the MUL instruction automatic for the (mega) chips that support this instruction - When using HTML Help the hhActiveX.dll must be installed - CONFIG ACI=ON|OFF, COMPARE=ON|OFF Will switch ACI On or Off and will allow ACI to trigger input capture of timer1 by ACI. - SPC() for graphical LCD's fixed. R24 was destroyed after the first space. - tiny26 support added. - Bin2Grey had a wrong reference to the asm code for integers/words, resulting in an error message. - Removed the credits form. It is in the helpfile now. - Added plugin font editor and plugin support. - SERIN and SEROUT added. These are dynamic software UART routines. All parameters can be set at run time! It works for any pin. And also for the same pin. Serin S , 0 , D , pin , 19200 , 0 , 8 , 1 Serout S , 0 , D , 1 , 19200 , 0 , 8 , 1 S - a variable 0 - number of bytes to send/receive , for a string, always 0 D - the port to use, in this case D pin - the pin to is(0-7) then the baudrate, parity(0=NONE,1 = EVEN, 2 = ODD) number of databits(7 or 8) and the number of stopbits(1 or 2) You can use variables for all parameters. This makes it simple to change them at run time. Note that these routines are stand alone: they can not be mixed with OPEN/CLOSE - CONFIG CLOCK has a new option : CONFIG CLOCK=USER This will dimension the internal variables so you can use DATE$ and TIME$ You need to fill the variables yourself with your own clock code. - Added boot128X.bas This is a variant of the normal bootloader. It will wait for some magic bytes from the serial port at start up. Also the pages are erased before they are written. Note that the bootloader programs only serve as samples. There is no support intended for every AVR micro. - Improved uS delay timing used for ISP programming. - Register R6 is not saved anymore in interrupts. This to allow to set the ERR bit from inside aninterrupt without the need to use NOSAVE option for this. - $LCDVFO added for VFO displays. They need a very short enable pulse to avoid flicker. - getkbd changed: a delay of 100 mS is inserted. This delay solves the problem of some keyboards that return values higher then 16. - glcdSED.lib added for SED1565 graphical display support. Should work with all SED based chips. See sed.bas GLCDDATA and GLCDCMD added. LCDAT added for SED LCD display on/off works SETFONT added for using different fonts See SED.bAS demo file - circle statement fixed : fourth quadrant had x and Y reversed - extended RC5 receive added thanks to Gert Boer who did the research and modified the code to support extented RC5 reception. Since there is an additional bit, the toggle bit has been moved to bit posisition 7. The extened bit is in position 6! - loadlabel() function added. See readdata.bas sample - boot128.bas sample added for M128 bootloader. - tiny15.bas sample added that shows how to use tiny chips without sram 1.11.6.8 - I2CINIT added to help. Can be used to re-init the I2C pins if altered when writing to PORT or DDR by the user. - Showpic and ShowpicE statements did not worked for all pictures. The BGF RLE compressed files are now smaller but need to be recreated because of the new RLE encoding/decoding technique. - writeeeprom with strings, writes only the length of the string and not the dimensioned size of the string now. - print(preview) can be done in B&W or color. See options, printer - print(preview) line numbers are also printed(by 1.1.6.7 update they were omitted) - baud rate error calculation in report was wrong. - LINE draw routine had a problem for some angles. fixed. 1.11.6.7 - LINE routine rewritten. Draws perfect lines now for any angle. - Graphic LCD supports mode 6 too now for showing pictures. You need to recreate the pictures for mode 6 ! - Graphic lcd 128*128 supported - print preview and printing works in color now for color printers. 1.11.6.6 - Universal programmer support for the HotChip programmer. - Josef Franz Vögel worked hard and here are his latest routines: ATN2, ASIN, ACOS, FIX, ROUND, MOD, SGN and rewritten SQR. SHIFTSL and SHIFTSR are shift rouines for single variables and are used by the SHIFT statement that now can shift a single too. INT was modified and POWER takes the sign into account now so that ^ will use the power routine now. Also SQR() for byte,int,word and long added. Also an alternative SQR routine lib is provided. It works faster but uses more code. - buffer serialinput rewritten. Also added for second UART: CONFIG SERIALIN1 = BUFFERED, size = 30 CONFIG SERIALOUT1=BUFFERED,size=20 - added spi-softslave.bas that show how to implement a SPI slave using software. Great for chips like the 2313 that do not have SPI - added M161.bas to show how to use 2 hardware UARTS also added: baud1,$baud1,$serialinput1,$serialoutput1 - added ds2405.bas sample for 1wire switch - servo code optimised. USes a word now instead of 2 sepearate bytes. - Circle statement added. Circle(x,y),radius,color . Thanks to Josef Franz Vögel who wrote the circle code! - picture data can be stored in EEPROM too now. Use showpicE instead of showpic to show from EEPROM. - Graphic converter saves data RLE encoded. Showpic is using RLE decoding now. This saves a lot of space. Thanks to Brian Millier - STK200 circuit changed in helpfile since it showed a wrong connection. - ATN function from new fl_trig.lib did not work for negative values - Mid with local strings failed - INPUT num and VAL() can detect a leading + too now. For example +12. - M323def.dat contained some wrong bit value number for powersaving. - added custom lcd lib with busy check lcd4busy.lib. 1.11.6.5 BETA Do NOT forget to compile your project before simulating it. The new DBG file is not compatible with the old one and simulating a program compiled with a previous version will give problems! - 240 * 128 lcd now supported - added LINE statement for grapical lcd - waitus routine optimized. It is more accurate now. See also help. - Added autobackup see environment IDE options - ABS() works for singles too now - Frac() function added, returns fraction of a single sin,cos,tan,atn, int, rad2deg,deg2rad, log10,tanh,sinh,cosh power. log and exp replaced with new routines from Josef Franz Vögel Josef provided a demo too. When there is a problem don't blame Josef since the adaption into the compiler can be the problem. All was tested however :-) - the simulator can now print to the comm port. - min() and max can return an index too now: max(w(1), m,idx) ' m will return the max value, idx the index min(w(1),m,idx) ' m will return the min value, idx the index When used with an index, it must be used as a statement, not as a function ! - M128 support added : use M128103.dat for the M103 compatible mode. Use M128def.dat for the M128 mode - support for WinAvr and SP12 added to the universal programmer - err bit added to help of i2c - M8 support finished. config COM1=dummy,synchrone=0|1,parity=none|disabled|even|odd,stopbits=1|2,databits=4|6|7|8|9,clockpol=0|1 - log window added to the auto update function. - calculation of the user sram available space was wrong. See also $dbg and DBG - $DBG and DBG added for determining stack overflows use tool stack analyser. Requires that softstack is set > 0 - pulse generator added to the simulator interrupts TAB. Select the counter pin and the number of pulses to generate. Timer simulation must be checked to use this option. - variable color can be selected in the environment options too now. - using SET/RESET in combination with alias reported an error when the alias was a register. - error 70 will be reported when baud rate error > 10% The report already shows the error by the way but this give you a clear indication that the selected baudrate will not work - crc16 added(already in 1.11.6.4.) - eurtimedate.lib added for soft clock : gives DD-MM-YY format instead of mm/DD/YY - added fuse bit I and H to the programmer for JTAG bit programming. - assigning a string in a sub with left or right could give error 260(string too short). - external programmer accepts {FILE} to insert the program file and {EEPROM} to insert the EEP file on the command line - .equ accepts expressions too now. .equ myval = (10+2)/4 ldi r24,myval+2 '5 ldi r24,asc("A")+1 ; load with 66 works for all asm mnemonics that accept a constant value - added check for compiling a LIB file. An .ERR file will be created when an error occurs - DEMO can compile lib files too now. - New option to dim variables as pointers: Dim A As Byte At $60 'dim at hex 60 Dim Y As Byte At $60 Overlay 'use overlay to point to same location A = 1 : Print Y ' will print 1 Do not make mistakes with different datatypes allthoug this could be handy too: dim L as long at $60 dim b1 as byte at $60 overlay dim b2 as byte at $61 overlay dim b3 as byte at $62 overlay dim b4 as byte at $63 overlay l=&H12345678 : print hex(b4) ' should print 12 So this can be an alternative to alter byte positions within a word/long since the duplicate/overlayed var does not use any additional space OVERLAY does not DIM a real variable. It may only be used after other variables occupie the space. OVERLAY is in fact a pointer to a space in memory with the spcified size! So even when you overlay a LONG, it will not use the 4 bytes that are normally used by a LONG. - Extended stk500 support is provided now. This is a new option in the programmers list. Also : use new $eepromhex directive to create Intel HEX EEPROM data files for the stk500. - Bin2grey and grey2bin function work for integer/word and long too now. Thanks to Josef Franz Vögel for an improved algo and the word/long versions. - The I2c routines are in the library i2c.lib. Config i2cdelay has been changed. Timing is in uS now. - config spi accepts a new parameter for SS. Intended to be used when you wanto to handle multiple slaves - i2c wbyte can be simulated now in the simulator. - AT option gives an error now when used at an occupied address - idle and powerdown example added - lcd emulator fixed: deflcdchar 0 could not been displayed. also fixed: lines 3 and 4 were not updated - getatkbd() routine has a bug in 1.1164:fixed The new getatkbd routine works better with shift key. 1.11.6.4 - printbin also accepts an additional numeric param to indicate the number of bytes to send : printbin ar(1) ; 2 ' send 2 bytes from ar(1) - rc5send and sonysend IR remote control transmission statements. - inputbin accepts an additional param when used with arrays now: inputbin ar(1),2 ' will read 2 BYTES. The additional param must be a number - waitms problem fixed. Bug introduced in 1.11.6.3 : MSB >0 resulted in no delay. - getkbd changed to support 6 rows config getkbd=portb, rows=6, row5=pinD.6, row6=pind.7 ,debounce=20 not tested with hardware - BINVAL() option added. Will convert a string in binary format into a number. s= "01011" : v = binval(s) 'v will be 11 - The IDE shows new chips but they are not yet supported(M8,M16,M64,M128) Once it is verified with sample chips it will be released. - Renamed M32 into M323 in case Atmel will come up with a M32 chip. - Fixed : INPUTBIN with strings deleted the last entered character. - Enlarged resolution of servo routines. It will use 10 uS steps now at the cost of an extra byte from sram. Only change in your code is the reload value. Must be 10 now istead of 100. - LIGHT ALIAS PINB.1 CONFIG LIGHT = INPUT - Min() and Max() return the minimum and maximum value of a WORD array. - Grey2Bin and Bin2Grey function added for Grey-code conversion. - Security byte added to EEPROM WRITE routines. R23 is set to 123 before the write routine is called. - Added Universal interface for programmers. This means that you can customize the pins used by your programmer! - M163 fuse bits programming problem fixed. Datasheet had a wrong description. prog.ini changed. - inkey() will set ERR when no data is returned When data is returned (0 for example) ERR will be cleared. This way you can use ERR to detect if a byte was received. This works also for 0 bytes. - config RC5 has an optional param to select timer2: config rc5= pind.2, timer=2 Works only on chips with timer2 - Added line numbers to the IDE - Added snapshot to simulator - Added $MAP directive that generates line,address info in the report - Added string variable to DTMFOUT : DTMFOUT s , time s can be a string assigned with "12345" for example. s may not be a constant! Also fixed a problem with the duration. A register was destroyed so the duration was not correct. 1.11.6.3. beta - Added warning when $SIM is used while trying to program a chip - indexing bits with an array did not work like ar(i).var = 1 - $BOOT option added. This to allow inclusion of a bootloader program $BOOT = $1E00 ' MEGA 161 se help - SPM asm mnemonic added for boot loader support - Bin() function added. Bin() converts a numeric variable in the binary string representation. dim b as byte : b = &B11001010 : Print Bin(b) ' prints 11001010 - Lookdown() function added for bytes and integers. Dim Idx as integer, search as byte,entries as byte search = 3 : entries = 5 Idx = lookdown(search,label,entries) nop Label: data 1,2,3,4,5 Search is a byte variable that holds the number to search Entries is the numner of entries in the table The result will be -1 when not found or will be 3 in this example since the third value will match Lookdown also works for integers. Search must be dimmed as integer in that case. - Optimized string<>num conversion routines. FRAME size must have a minimal length of 16 now. This space is used for the num<>str conversion like when you use INPUT integer. THe data you enter is stored in this buffer and then converted to an integer. - Added range check to floating point mul routine. Otherwise when mul with a very small number, there result might be wrong - Servo routine changed so the limit will be 20 mS when reload = 100 will be used. Servos need a 20mS pulse. Before 25 mS was used. Also the servos are now synchronized turned on. - Optimized hex 2 num conversion routine. HEXVAL() may have a string of odd bytes too now. Before hexval() needed for example 0A. Now you may use A as input. - When you use Save As, you will be asked to leave the CFG file. WHen you choose Yes, the CFG file is copied so the old one still exists. When you choose No, the CFG file is renamed so the old one is deleted. - the path is saved and restored now between sessions. So opening a file from c:\test will set the path to c:\test the next time you run BASCOM. - Added GETADC() simulation. In the hw simulator you can provide the value of the adc - INT0/INT1 is now simulated too when setting/resetting the port bits in the HW simulator window. - Also added a port delay to the parallel printer port based programmers. You can use this option when the programmer runs to fast on a very fast PC. The generated clock takes the PC speed in consideration so it should not be needed. Added for testing purposes. Default value should be set to 0. - Added a test mode to the Sample Electronics programmer. In case of problems go to the File, Test,Sample Electronics Programmer and choose the menu items to set the various used pins. After setting a pin to +5V you can read the value with a DVM to see if it works. - _ADD32 library routine was double referenced. - SPC() added : Print "test" ; Spc(5) ; "this" SPC() prints spaces. The difference with SPACE() is that space() will create a temp buffer when used with print. SPC() wil just send the number of specified spaces. Wil work with LCD too : LCD "Hello" ; spc(3) ; "world" - Returning the MID() of a string where the starting position was > the length of the string gave a wrong result: s="abc" : var = Mid(s,4) returned the string starting at pos4 without checking the length of the string. The result should be an empty string. Also changed the mid statement. - INSTR() function had a bug in the library code. When a part was found but not totally matched, the returned position was wrong. - echo on ,echo off added. This replaces the INPUT var NOECHO option. When you had code like : INPUT var NOECHO , you must rewrite it to : ECHO OFF INPUT var 'to turn it on for the next INPUT : ECHO ON Existing code will still work but it saves code to turn echo on and off only when needed. 1.11.6.2 - Added HTML help (bascavr.chm) that can be used on W98 and W2000. To use the HTML help instead of the old windows help, select the option from Options Environment IDE. Also added helplinks to the menu. So pressing F1 while on a menu item will bring up the help. - New : $TINY is intended for tiny support. At the moment it will not setup any stack pointers since there is no sram in the tiny parts. You can write in asm or may use part of the statements since only a 3 level hw stack is inside the tiny parts. There will be a separate lib for the tiny with a subset of BASCOM statement. To use a variable dim it like : dim var as IRAM byte Future support for tinys will be for byte and int/word only - help file was updated for the language reference. - string -> single conversion had a problem where there were zero;s after the dp : 0.01 was converted to 0.1 - the right() function returned wrong number of chars in the 1.11.6. Also optimized and help file correted. - The compare mode simulation was working only for pin PORTD.5 since the 8515 was used to develop BASCOM. Changed to look at the chip. - The mcsbyteint.lib NUM2STR conversion routine was bigger than the original MCS routine. So I put the original code in the lib. When using the generic byte,int,word,long lib from mcs.lib printing a few ints/words : 836 bytes When using the previous mcsbyteint.lib : 798 bytes With the new routine : 748 bytes (bytes inclusing the total program btw) - Added DTMFOUT number, time number is a numeric variable or constant and time is time in mS the dtmf is generated. Uses TIMER1 in interupt mode. See dtmfout.bas example Not tested with telephone line. - _CheckEpromReady had a bug. The Z-pointer was increased before the whole address was transferred to the address registers. Only occurred in big chip with >255 byte EEPROM - Print Fusing(s,"##.##") had a problem - Mid(t$(1),1,1) = "a" ' had a problem 1.11.6.2 17-apr-2001 - IMPORTANT NOTE : since the HW stack, soft stack and framse are all selectable now, it means you need to make the settings for your existing programs. Look at STCHECK. - Added CRC8 check : result = crc8(array(1),7) ' to look at first 7 bytes of array - Fixed memory leak in the IDE. - Changed bascavr.krf (help notes file) - Added LOG() and EXP() function. Also corrected power bug with singles : 2 ^ .5 for example did not work Using ^ with singles will use log() and exp() funcions. - Select case optimisation in 1.11.6.1 had a bug for select case with strings. - Internal variables can be optional showed in the report. - Fixed a problem with ^ for single variables. s ^ x did set X to 0. - Report stays on top and is refreshed after compilation. - Added STCHECK for checking stack sizes. - rewrote the floating point > string routine so now it is compatible with the routine from BASCOM-8051. It gives more digits after the DP. It will use 24 bytes of framespace max. - string concatenation with arrays and reusing the same string had an error. for example : ar(i)= "abc" + left$(ar(i),x). Here ar(i) is used and overwritten. 1.11.6.1 - Added waitkey() support for the software uart : var = waitkey(#1) - Added SERVO driver implementation. See the servos.bas example. Control up to 16 servos! - Added interrupt driven AT Keyboard read sample. - Fixed a bug in Left$() introduced in 1.11.6 beta - Moved string compare to the mcs.lib and optimized the code. No local storage is used anymore for string-constant compares. - The Lib had an error for registers. The incorrect address was used. When you use a register in a lib, you must include the register address like: .equ EEDR=$1d This error caused the EPROM read/write routines in the lib to fail. - Optimized SELECT CASE. When you need multiple test like: if a =1 then elseif a=2 then elseif a=3 then end if It is better to write : select case a case 1 : case 2 : case else end select It generates less code. - The moved EPROM write and read routines had an error in the mcs.lib. The test for the EPROM size should be >256 instead of >255 Also a label name was mistyped resulting in an error. - The new waitms routine caused an error with debounce. - The softclock routine works until 2099 now. - Added copy to clipboard function to the Report window. 1.11.6.0 BETA - Added MUL to simulator and it is used for the M161 and M163 that support the MUL instruction. - Added some basic programming support for the STK500(serial programming). Last minute add so it only erases, programs and verifies. - Added custom LCD libraries so you can change them when needed. Not all LCD related routines are in these libs yet(home etc) There are 2 versions : LCD4.LIB with the example LCDCUSTOM4BIT.BAS This is an optimized version of the normal LCD routines but it uses fixed pins. LCD4E2.LIB with the example LCDCUSTOM4BITE2.BAS This is a version that supports 2 E lines for 40*4 displays. It also uses fixed pins. - Added active filename to the programmer. - Added time in mS to the cycle counter in the simulator - $ROMSTART = &H4000 can be used to let the HEX file start at $4000 Use with $NOINIT to exclude int. vector setup. Can be used for bootloader - Added memory map variable display to the simulator Memory window. - ROTATE LEFT had a bug for words. Also optimized the rotate asm code. Also optimized the SHIFT asm code. - Added a byte optimized version of the num<>str conversion routines. This because the conversion routines are optimized for byte,int,word and longs. This means that when you use only byte conversion, there is overhead for the int and longs. $LIB "MCSBYTE.LIB" will reduce code size when only byte conversions are needed. $LIB "MCSINT.LIB" will reduce code size when no LONG conversions are needed. - WAITMS now accepts a WORD instead of a BYTE. $OLDWAITMS will use BYTE version of WAITMS since the wider range of the new WAITMS needs 2 instructions more to pass the value of the delay. By using WAITMS 1000 you dont need WAIT 1 for example. - START AC and STOP AC did the reverse thing. START AC, stopped and STOP AC , started the AC comparator. - New entered crystal values are stored now. - sbci instruction was not simulated correct. - the sim did not cleared the I bit in an ISR. MEGA chips return addresses were also not simulated correct. - using multiple {065} in a string constant did not worked. Only the first was changed to A in this example - optimised ON GOSUB, and also fixed problem that occured when used more than once. - _CHIP , _RAMSIZE , _ERAMSIZE and _XTAL constants added - Optimised BYTE varable code generation like : byte = num,byte = byte, byte=var(num) - Rewrote Str(), val() and Hex() and Hexval routines. They are in the lib now. When using Hexval(), the input must be a multiple of 2 - Added support for the M32 chip. I dont have info on this chip so please dont ask about it! All I know it is M163 with 32K ROM,2K RAM and 1 K ERAM - deflng,defsng ?? - Added LPM rx,Z and LPM rx,Z+ , ELPM rx,Z and ELPM rx,Z+ Can not be used on all AVR chips. In fact I dont know which one supports it :-) But feedback from Atmel learned that it is almost certain that new batches will have support for these instructions - MEGA103 : Constants above 64KB were addressed 1 byte to high. Resulting in not showing first chars. - converting "12456" to a single gave wrong results : _check0 routine changed in mcs.lib - Using STOP generated duplicate labels. - HIGHW() added. - CONFIG KBD = PORTB,DEBOUNCE = value (default 20) - SECTIC option added to the software clock. It can be used to jump into a user routine every time the second is updated: CONFIG CLOCK=SOFT , GOSUB = SECTIC You must must write a routine like this : sectic: Print "*" '1 second past away return Note that since all registers are saved. 1.11.5.0 HELP FILE NOT UPDATED YET - Added expressions to constants. CONST a = 2 CONST b = a * 2 + (10/2) ' for example - Added conditional compilation that can be used nested: #if a = 2 Print "this will be compiled" #else Print "this not since a =2" #endif See const.bas example - Programmer(s) (parallel based) did not work for low XTAL's like 1.8 MHz on the 2313. Now when you fill in the XTAL speed in the Compiler Communication options, a slower clock is used for xtals < 2 MHz. - Simulator did not simmed ELPM instruction incorrect, resulting in strange behaviour when object code >64KB. - Added HighW() function that returns the 2 MS bytes of a long. - Adjusted 1wire timings since DS2405 gave problems. - Added 1WVERIFY routine to verify if a 1wire device exists on the bus 1wverify array(1) [,port,pin] ERR will be set to 1 if the 8 byte number provided in array() does not exists Otherwise ERR will be 0 indicating that is has been found The routine calls 1wsearchNext() - The M163 had a problem with some rjmp's. THis because memory wrap was enabled and the M163 does not need memory wrap for RJMP/RCALL. - $NORAMCLEAR will not clear the RAM content after a reset. - The new 1wire search routines contained some serious bugs. I misinterepreted the algo so it seemed to work but not for many sensors. The array that gets assigned must stay the same between a first and the next reads. To solve this I use another 8 bytes of SRAM (___1wire_data) - Forget to mention it in 1.11.4.0 but the CONFIG TIMER has a new option. It is in the help. With the option you can set the OC pin for output or not. 1.11.4.0 20 dec 2000 - Added 1wsearchfirst() function to scan for the first ID on the 1wire bus. Added 1wsearchNext() function to scan for the next ID. Use 1wsearchNext() in a loop to get all the devices until the first byte of the result is 0. - Added 1wirecount() to count the number of 1wire devices on the bus. See the 1wireSearch.bas example. - During startup, the basc-avr.dll version is checked. When it does not match you will get an error message. You must delete other versions of basc-avr.dll in that case. Common an older version could be found in the windows\system dir. Only a copy should be in the BASCOM application dir! - $WAITSTATE compiler directive will set the wait state and allow xram access. It is the same as enabling these features from the Compiler Chip Options - Added string=Fusing(single,mask) Mask may be "#.##" or "#.&&" where # means round and & means no rounding See help. - Added check for wrong asm code sequence like sbic followed by lds ( a 2 word instrction). - Added chip reset to the programmer. - Labels and subroutines are now sorted in the IDE lookup lists. - Finished M163 lock and fuse bit programming. Since I have only 1 sample I did not test all the options since some can only be unprogrammed in parallel mode. - Using BUS MODE for the LCD without XRAM access enabled will force xram mode now. A warning is added to make the user aware of this fact. - The new M163 has options for the reference voltage For this chip you can use the additional param : Config Adc = Single , Prescaler = Auto, Reference = Internal The reference param may be : OFF : AREF, internal reference turned off AVCC : AVCC, with external capacitor at AREF pin INTERNAL : Internal 2.56 voltage reference with external capacitor ar AREF pin Using the additional param on chip that do not have the internal reference will have no effect. - The _CHIP constant in the report is an integer that represents the chip number. It is linked to the chip selection list where you select the chip. It starts with 0 for the 2313. It is used for conditional compilation in the library - New M163 shown wrong rom image size in report. - Added buffered serial reception. CONFIG SERIALIN = BUFFERED, SIZE = 20 This will use an input buffer of 20 bytes. You must enable interrupts yourself because it is interrupt based. See the sample RS232buffer.bas - Also added for output CONFIG SERIALOUT = BUFFERED, SIZE = 20 This will create buffered output where the data is sent on the background when the UART transmitter is ready. See rs232bufferout.bas - The AVR ISP programmer had a strange error : some code would pup up a Zmodem dialog window. Probably the object code triggered the zmodem condition. - Added label option to READEEPROM and WRITEEEPROM. See help or EEPROM2.BAS example - The parity was not handled correctly for O and E with the software UART. The bit counting/parity check routine was ommited in this version by mistake. - using $regfile for the new M163def.dat loaded the attiny.dat file because of the copy & paste,forget to edit problem - Using CASE with a constant or variable beginning with IS failed because of the CASE IS test. - Using E as variable failed because it was seen as a numeric constant. 1.11c 13 nov 2000 - $serialinput2lcd did not work. Only the first char was displayed. - Added support for the M163. The M161 shows up too but since I do not have this chip yet, I can not support it yet. So the M161 WILL NOT WORK. The M163 is tested and works. The programmer is partially finished. Writing boot and fuse bits does not work. More over, I am not satisfied with the Options TAB yet so it will be changed. - Added TIME$ and DATE$ variables. Together with the CONFIG CLOCK = SOFT, you get a clock This works for the 8535,MEGA103 and M163 only. They have a special timer that can run async. with 32768 KHz. Date$ format is MM/DD/YY , TIME$ is hh:mm:ss See the megaclock.bas example - TIMER0 and TIMER2 for the Mega103/603 are now correctly handled. - TIMER2 for 8535 is now supported : CONFIG PRESCALE = 1/8/32/64/128/256/1024, CLEAR TIMER = 1/0,COMPARE= DISCONNECT/SET/TOGGLE/CLEAR, PWM=ON/OFF , ASYNC=ON/OFF - The M103 can be used for 128K now. The LPM instruction only works for the lower 64KB. ELPM is now used with the RAMPZ register for the MEGA103. The ELPM instruction is also recognized now by the compiler/assembler. - Added cpeekH() function to get a byte from code memory of a MEGA103. This chip has 64K Word memory. Cpeek() will peek into the lower 64KB and cpeekH() will look into the upper 64KB. - ASCII characters above 127 are converted wrong. ë for example gets the wrong ascii value of 235. VB will do the same thing btw. So I am not sure if it is a bug. But it behaves like one. Possible for some fonts/language settings this bug does not occur. Since I can not change it in the tools I am using to create the compiler I created a work around: s = "abc{137}" {ascii} will be converted to the proper value. The ö can be created with {239} for example. See language fundamentals in the help. - The cycles can be cleared now in the SIM by right clicking on the statusbar. - Passing a value BYREF when the previous param was an array failed when a sub was called. - All SRAM is cleared now when the micro is intiated. Variables don't have to be set to 0 or "" now before you use them. - .equ can be used too now within BASCOM. - Added bcd.lib and bin2bcd16.bas example. Received from a user and shows how to use functions from libs. 1.11b - Added full support of 7, 8 bits and N, E or O parity to the software UART for both input and output. - Programming >64K failed for the M103. You need to use the BIN file btw since the HEX files work up to 64KB. - Using a loop with operator < resulted in an error because of duplicate labels were generated. - Reported rom size was wrong. So check on code size also failed when it was 2 bytes oversized. - Optimized some more code. This especially for chips with SRAM of up to 255 bytes. This means you can put more code in your 2313 now. - Added auto Sim option. So you can simulate automatic after successful compilation. If auto program is enable too, the chip wil be programmed first! - Passing a numeric array to a sub/function passed the wrong base address. Passing ar(1) , actually passed address of ar(2). So there was an offset of 1. !!!!! - DOWNTO is rewritten. You can use TO no also for negative steps: For a = 10 TO 1 STEP -1 'for example X = -2 For a = 10 TO 1 STEP X 'using a variable gives more code since the sign of the variable must be tested. Using a negative step with a variable only works for integer, long and single - Using more than 10 software uarts gave an error because of a duplicate generated label. - The terminal emulator stays on top now and the settings are accesable from the terminal window menu. - When you empty the path in the IDE options, the location of the last opened file will be remembered now. - When you use File, Save As .. and the name exists, you will get a warning if you want to overwrite it. - referencing variables in ASM with {} did not report them as used in the report. - ' did not work as comment in asm code. - HEX files in the programmer may have split addresses too now. This way you can program chips with hex files generated by other tools. - enable SPI must follow after the SPIINIT statement, otherwise SPI interrupt will not be enabled. Or you may add , INTERRUPT = ON after ths CONFIG SPI statement. When you use this additional parameter it does not matter in which order you use SPIINIT. - Added PULSIN statement. Pulsein wVar, PINx, pin , state Where wvar is a word variable. PINx is PINB, PIND etc. pin is a numeric constant or variable for the pin to sample(0-7) State can be 0 or 1. 0 means sample on 0-1 transition. 1 means sample from 1-0 trans. Err will be set to 1 in case of a time out. wvar will be 0 in that case too. wvar returns time of pulse in units of 10 uS (approx.). Will work more accurate on higher xtals. For lower XTAL see mcs.lib source for suggested modifications. - remark ' did reformat to position 1. It should not reformat when 'is the first position. - forgot to include the bascavr.kf in the distribution - Added error message when you assign a PINx register. These registers are read only. - Probably of a hang up some old fixed things were not saved. The Optimise button was still not selectable. 1.11a - 1.11 could not be uploaded because of problems of my ISP. 31 aug 2000 I added new things and checked some problems so here is 1.11a - BAUD = 2400 will work on the hardware UART as normal. But added BAUD #x, yyy where x is the channel number and yyy is the new baud rate to use. use it with the software UART channels to change the baud rate at run time. It will use 2 bytes of SRAM to hold/load the bit delay time. CRYSTAL has been changed see this topic in the help file. - PG302 programmer did not function because for some reason the baudrate has changed in my delphi form? - Fixed LCD 16 * 1A mode. It did not wrap to line 2. - The CONFIG SPI = Hard ... did not set the SPE bit so hardware SPI did not work. You had to set it manual. - Added ReadMagcard routine to read magnetic cards data. Both 5 bit and 7 bit coding are supported. - The IDE now has an option to jump to a label or sub or function. When you type there are also pop up boxes with paramers. This can be switches off. It does not work 100% yet but it gives you a nice idea of how it can help you while you type. - Added FORMAT() function for formatting numeric strings: s = Format(st, " +00000.00") When there are leading spaces, spaces will be added. When there is a + , the + will be added when there is no - sign. The number of zero's determen the number of leading zero's. Optional is the decimal point which you can insert into a number. - Using DEBOUNCE on a Mega with port F failed because it has no DDR register.(F is always input) - Compare pin A /B are set now for the 8535 and the MEGA and other parts. Prviously only the pin on the 8515 was set. - Changed 1wire routines. Now they are in the mcs.lib. when multiple pins are used no extra code is needed anymore.(almost duplicate code was generated for each pin) But the syntax has changed: When only the default 1wire pin is used the syntax remains the same. For the explicit pin specification for use with multiple pins, the syntax is : 1wreset port,pin Where port is PINB or PIND or any other PIN register. pin is a pin number in the range from 0-7 and may be a constant or variable. For 1wwrite with port option: 1wwrite bytes,PINx,pin where PINX is PINB for example and pin is a variable or constant for the pin number For 1wread: var = 1wread(bytes,PINx,pin). See above - Open can be used with 7 databits Odd and Even parity too now. - Added Checksum() function that returns a checksum of a string. Dim S As string * 10 , b as byte s= "hello" : b=checksum(s) - The AT option (DIM ... XRAM AT) did not worked for the upper 32 KB. - Added LET for compatibility with BASIC stamps : LET a = 1 - Mid() function did not addressed correct character with LOCAL strings. 1.11 @##@$@ could not upload it because my ISP had troubles. And I had to leave for vacation. So I upload 1.11a 10 aug 2000 - Fixed problem in ISP programmer. Writing a buffer without Auto Program failed. Also writing a Mega chip failed when too many pages were written. - Added delay to LCD init routine so the LCD has the time to reset. The AVR is running faster after a reset and this caused a problem in some cases with a soft reset. - Inkey() for the software UART triggered on the wrong bit level. In effect making it not work for low crystal values. For higher XTAL's it worked. - Added variable index to ERAM variable. So now it is almost a normal variable! You can do only assignments on them however. Dim Ar(10) As Eram Byte , Idx As Byte , B As Byte For Idx = 1 To 10 Ar(idx) = Idx Next For Idx = 1 To 10 B = Ar(idx) Print B Next End - added sincos.bas example. - Optimize button was accidently disabled. Must be only disabled for DEMO. - END will disable interrupts and generate an endless loop. This has not changed. STOP will not disable interrupts now and will only generate an endless loop. - Added warning when there is an END statement after the DATA statements. DATA lines should be the last in your program. - Finished the SIM for the LCD and LED part. Some exciting things will follow too for the SIM. ERAM is simulated too now in the simulator. What remains is simulation of the timers. - Added Real hardware simulation. Together with the BASMON.BAS file that you need for it. (in DEMO only available as compiled file for the AVR90S2313) - Added mylib.lib and mylib.lbx to the LIB And libdemo.bas to the samples. It shows how to create your own ASM SUBS and FUNCTIONS - Fixed FP compare routine. 1.10 This release is made public to fix the I/O 998 error on some machines. The simulator part is not finished! The LCD simulation will work however. The led's dont reflect the right state! But I had to stop somewhere... - In an interrupt routine you may use multiple Return statements now. But the first RETURN that is outside an IF .. THEN or other loop will generate a RETI (and will restore all used registers). - File Save As, now also renames the CFG file so you don't loose your settings. - Added TO to the CASE statement: Select case Var Case 1 TO 10 : Print "A is 1-10" case Else End Select - Added multiple test : If a >10 AND a <15 OR A = 100 Then 'a is 11-14 or 100 End If You can not use () and the tests are evaluated from left to right. - PRINTBIN uses ; as a data seperator now just like B8051. It used , but that was wrong. , is for INPUTBIN. - .equ is now also recognized. - Mid(s,z,[num]) = "const" can now be used too. - Floating point compare routine rewritten. Also fixed bug in FP addition with negative numbers. - Simulator did not handled the stack pointer right. Also not all LOCAL vars and passed variables were shown. - The CONFIG SPI= HARD mode contained a bug in the evaluation. Caused errors 12. - The $include directive did not put the right file number in the object file. And as a result the Simulator showed an error with an invalid filename. 1.0.09c - Aj, the b version contained a serious bug. 8 may 2000 The lib routines were not bind in LIB order. This caused out of range errors. So it was good to make a check for it! I also added checking for a , when needed but also put it on ASR. And ASR does not need a second param :-( So the LCD example for example gave errors. - I also added line length of 1024 instead of 255. Lines longer than 255 caused a gpf in the reformatter routine. 1.0.09b - Added PULSOUT statement. PULSEOUT PORT, PIN, PERIOD Where PORT is PORTB, PORTD or any other port. PIN = the pinnumber (or a variable between 0-7) PERIOD = 1-65535. Each period will toggle the state for 1 uS with 4 MHZ clock You can insert NOP mnemonics for higher xtals too in the ASM source.(_PULSE_OUT) - Optimized the ISP programmers : they should work much faster now. - Finished the variable bit support. Now you can use : If Var.IDX = 1 then - The SPI in hardware mode is full configurable now from the CONFIG SPI directive. - Added var = INKEY(#1) support. So you can poll a software UART to see if there is data available. You could use an interrupt handler that triggers on the positive edge and that will get the data with INKEY(#x) - Added feature to compile a LIB into object code. The compiled LIB has the extension LBX. A LIB can be compiled from the Tool LIB manager options. Works only in commercial edition. With the ability to create a LBX you can make add on libraries for BASCOM and sell the ASM source. The LBX has no comment and only the labels and jumps are in the source code format. - Added range checking on assembler jumps like breq lbl. Also added check for using the right registers with instructions that use constants (like LDI reg,255) - The software UART can use lower baudrates too now. I changed the timing to allow this. It also works with higher xtals and low baudrates now. - Added interrupt simulation. You must press the button to generate an interrupt. Only the global int flag is checked and the individual enable/disable flags are not taken into account. - Added CONFIG INTx = prm , support where x is 0 or 1. The parameter can be : LOW LEVEL , FALLING , RISING INT4-INT7 were already supported (on the MEGA 103 and 603). INT2-3 are always low level triggered! So there is no option available. - Added warning to the report when a PORT or PORT PIN is assigned to a variable. You may read the PORT of course so that is why it is a warning. In 90% PIN or PINX.Y is ment. - Rewrote _Float2long and _Long2Float conversion routines. Now they work within the full range. - Added Watch windows. In this window you add a conditon. when the condition is true the simulation halts. For example : var >= 2 - Added Local variable watch window. Variables will be shown automatic. So you can't add them. - Added $SIM option for simulator. This option will remove delays like WAIT and WAITMS for faster simulation. It may not be used for the final compilation otherwise there are no delays! - 123e4 (scientific format) is also recognized now - Added support for the KITSRUS programmer K122 1.0.09a - Added OutW address,value to store a word/integer - Added InpW(address) to retrieve a word/integer Inp() and Out work on bytes. InpW() and OutW work with integer/words - Added variable for bit operations on variables: Supported was a numeric constant like : SET var.1 Now you can use a (byte) variable for the position: SET var.x Works with RESET and PRINT too. Compare on this type like IF var.x = 1 is not supported yet. The Simulator is getting shape now : you can change variables during simulation. The sessions variables will be saved too now. But it is not finished yet so some buttons will do nothing yet. - Conversion from an int/long to a float did not work for negative numbers. Fixed. 1.0.0.9 - The POWERSAVE statement was not recognized. - The ISP programmer had a bug with files > 64K. It also seems a bit slow compared to the ISP software from Atmel. I am researching this one. - New is the code optimizer. It only does a few optimisations yet. But it is a good start. Other code was optimized too. - I almost finished the simulator. It is not ready but since I am a bit late with this update I decided to show the current state. You dont need to send bug reports about it because it is not yet finshed! To display the BASCOM simulator right click the Simulator button. This will bring up the Sim window. Writing the object code simulator was a hard job so finishing the user interface will be easy :-) So within 1 or 2 weeks it will be 99% finished. Be sure to set the AVR Object code generation on otherwise it will not work. - The int/long conversion to a single has a bug that it does not work for negative numbers. Will be fixed soon. - Fixed bug in SPACE() function. - Added type conversion to SINGLE calculations. So you can use : single = word * single 'for example! - Adci instruction was used but does not exist! Changed to Adc - Usage of . inside a string constant led to problems. It was recognized wrong as a floating point number. - Added GetATKBD() function to use an AT keyboard as an input device. - Fixed bug in displaying SINGLES. Number with a fraction were not displayed correctly. - Added Optimize option to the File generation options. But at this moment only a couple of optimisations are made. So the code optimisation is not completed! - Changed $INCLUDE so it will use the same path as the main program when no path is specified. - Added External RAM Access option to the compiler settings. This to enable the external RAM access even when you dont have RAM selected. You can must use this for INP() and OUT statements and for LCD in bus mode. Before this options was available you had to select XRAM even when it was not available. 1.0.0.8c - Optimized ON ... GOTO. It now uses a jump table which is more efficient. - When the first single was assigned the value of 0.0 the compiler complained about ___NM_XXXX value not found. Assigning it after it was 0.1 for example was not a problem. - Added RND() function. Returns a random number. var = Rnd(limit) - INPUTHEX and Hexval() had a bug that a value of 100 was not completely evaluated. - Optimized DATA handling. DATA is stored sequential now in code. This saves bytes when bytes are stored(they use 2 code bytes before). The LookUp() And LookUpStr() functions are also optimized because data is stored better now. This also fixes a bug when string data was used in combination with bytes with the value 0.(it was seen as a string terminator) The largest value for the index can be 65535 now instead of 255. This for large DATA tables. - MakeInt(LSB,MSB) had parameters reversed so it worked like MSB,LSB : fixed to LSB,MSB as stated in Help. - CONFIG SPI showed CLK instead of CLOCK for the CLOCK parameter in the helpfile. - By implementing the _SubFromFrame routine I forgot to remove the previous code so calling a SUB from within a SUB with BYVAL, resulted in a bad frame with unexpected values. - $XRAMSTRING directive did not work properly because of a bug in the compiler I used. - Added an option to IDE options to program automatic after succesfull compilation. - Added SQR() routine to the FP routines. 1.0.0.8b - Fixed a bug in the INPUT routine. No LF was sent. 4 feb 2000 - Added VAL() and STR() for floating point. This took more time than planned :-( INPUT also works with SINGLE's now. So only trig function must be implemented now. - Added routines so assigning and reading with STRINGS to/from EEPROM will take the length of the string into account. - Added type conversion for singles between bytes,int,words and longs. See single.bas file. - The reload value for the RC5 command was not correctly calculated for all XTAL's. - When $EEPROM was used to generate an EEP file, garbage was put in the file for some data types. - Not a bug but a tip : When SHIFTIN is used, you must use PIN.x and not PORT.x for the input pin. The PORT returns the value that was last written to it, not the actual value on the PIN. The samples showed the wrong PORTB instead of PINB. This was a (paste) bug. - A For..Next in combination with DOWNTO and bytes or words for the loop counter, did not finished the loop completely. For a = 10 downto 1 'did go to 2! - Optimized LOCATE statement. And added STK200 samples for pin and bus mode. - DATA with strings and bytes caused a byte after an uneven number of characters not to be read. 1.0.0.8a - Assigning an EEPROM byte with a byte failed because I mistyped the register name. Caused error : Error : 200 Line : xxx .DEF not found [_TEMMP2[addk255]] , in File - I published the changes but before sending a notification a bug was reported: I updated my Delphi4 to Delphi5 and it required me to change some variable types. But it had the side effect that the passed port pins for the LCD for example were null terminated. So the report did not show the info after the LCD pins. - To compensate for the new download I added direct assignment to ERAM variables: Dim X As Eram Byte X = 12 'now works Previously you could only assign a byte to the ERAM var. - I also added the Instr() function: pos = Instr([start , ] source, search) Where start is an optional starting position to search, source is the string to search and search is the string or string constant to search for in string. When found pos will hold the first position the string was found, when not found will return 0. 1.0.0.8 - Added a simple LIB manager to the Tool Menu. - Passing an array to a SUB/Function did not worked right. See the declare.bas example for the right syntax. - Added SPIMOVE() function: result = SpiMove(value) value is a byte send to the SPI and result is the result received from the SPI. Sends/receives one byte only. - Spiout did not send out all the bytes. The pointer was not increased. - Printing a single <0 did not print the right value and trashed internal memory. - Reading a double port register such as CAPTURE1 read from wrong address. - Assigning one of the double hardware registers such as COMPARE1A resulted in a wrong address assignment. Also PWM1A was not recognized internal as a double HW register. These registers must be written with the MSB first and that is why they are defined in BASCOM as Word variables. 1.0.0.7c 7 dec 1999 - Ai, I introduced another bug with the LIB support. I moved a subroutine and it depended on the wait subroutine below it. This caused the LCD routines to behave incorrect when printing a value because the delay did not walk to the wait routine but into another routine :-( Well in order not to have you download a new version each day I have tested the whole package again. 1.0.0.7b - There was an error in the $LIB support. It included the routines multiple times 6 dec 1999 when they were used more than once. And this caused an error message about duplicate labels. - I got some questions about passing arrays to subs. The declare.bas file has an example. 1.0.0.7 5 dec 1999 - Added CONFIG INTx = prm , support where x is 4 to 7. The INT4 and INT7 are on the MEGA 103 and 603. The parameter can be : LOW LEVEL , FALLING , RISING - Made a begin with LIB support. This way you have the source ASM which you can change or by writing your own LIB you can override the MCS routines. In order for this new version to work, you must create a SUB directory named LIB in the BASCOM-AVR directory. The MCS.LIB file must be copied to this subdirectory With the $LIB "mylib.lib" [, "other.lib"] you tell the compiler about your own library The MCS.LIB is always added by default and will be searched last. With the $EXTERNAL myroutine1 [, myroutine2] you inform the compiler which routines must be included from the LIBRARIES. See HELPFILE for more details. - Added selectable colors for the editor. Comment can also displayed in Italic and statements can be displayed in bold. - Added support for Eddie McMullens SPI programmer.(Beta : untested) - Added waitus statement. It wait for the number of micro seconds. But it needs a constant! - The Auto Program option will now display a seperate window. When it is finished with programming a sound can be played. The sound must be specified from the Options Programmer menu. - The programmer option 'Auto Verify' will only verify when autoprogram is chosen. During programming a window is shown now and you can abort programming by pressing Escape. When verification fails the program icon will be shown in RED. - Added PORTE and PORTF to the IDE(MEGA). - SET/RESET in a function or SUB failed to assign. - code for 4433 and 4434 chip recognition was changed by Atmel in the PDF. So I changed them too. - Added part of the Floating point routines. FP unit is supplied by Jack Tidwell and only slightly modified for BASCOM-AVR. Jacks FP unit is the best FP unit around IMO. - Added test for SHIFT and ROTATE statement. When the number of shifts was 0 a bad result was returned. - Sample Electronics simple programmer tested and verified ok. This is just a simple cable programmer. But it works great! Look in the helpfile for more details. - array(a+1) = array(b-1) is now possible - Replaced 4433def.dat file since the bit definitions were incorrect. - Added MEGA support: CLOCKDIVISION = value , where value ranges from 2-129 A value of 2 will divide the XTAL frequency by 2 for example All INT's are supported now.(ENABLE INT4 and DISABLE INT5 for example) - Added Getrc5() statement. See help or samples rc5.bas - Accessing the COUNTER and other double hardware registers failed because the wrong order was used. For writing the MSB must be written first! - Fixed LookupStr(). Did not function with value of 0. - Exit Sub caused problem with LOCAL's. - Added check for LOCAL's not used inside of IF THEN.. - Added parameter number check for SUBS/FUNCTIONS - Flash Programmer had bad values for AT22 and Mega103. - Flash programmer shows size of EEPROM too now. - Optimized Hex() code. 1.0.0.6 - Added simple programmer cable support (Sample Electronics design). In Beta. 19 oct 1999 - Floating point is in Beta. You can use all math instructions but there is no input/output yet. So Print/input/val and str will not work. At the moment only: Dim S as single : s = 1.1 : s = s + 2.2 : Dim z as single : z = 5.12 : s = s * Z So just basic math +-*/ You can verify output with AVR Studio and the hex content of the memory locations. So not really usable yet. Rest will follow soon. - Fixed MEGA label calculation. - Added support for the STK300 programmer. So the STK300 will work with the STK300 dongle. For some strange reason the STK200 dongle did not work. And they should be the same. When somebody knows the answer... - Added support for ATtiny22(great tiny chip!). - bcd() and Makebcd() did not work correct for all values. - 2323 and 2343 chips were not recognized by programmer.(wrong signatures) - I changed the byte order in the BIN files since they were reversed. I leave the swapping option since some programmers have an option for this. If no feedback about it I will remove the reverse byte option it in next release! - I2CRECEIVE did not send ACK for receiving multiple bytes. - Added $LCDPUTDATA and $LCDPUTCTRL compiler directives for LCD redirection. $LCDPUTDATA = MyLCDDataOut 'will call MyLCDDataOut whenever data must be send to the LCD display. $LCDPUTCTRL = MyLCDCtrlOut 'will call MyLCDCtrlOut whenever a control byte must be send to the LCD display controller. The data/control byte is available in register R24. - Added delay for Software uart : CONFIG WAITSUART = mS This compiler directive will delay for the specified time in mS after the last byte is sent with the software UART. - For the tiny 8 pin chips with internal osc. on 1 MHz there can be a problem with the software uart delay routine. This because the 1 MHz is not very stable. I added a reserved variable CRYSTAL which you can dimension as a BYTE and which can be changed at run time to change the baudrate: Dim Crystal As Byte Crystal = 66 'for 2400 baud at 1 MHz , 31 for 4800 baud, 14 for 9600 baud 'use the above values as a starting point. And at run time just change the Crystal variable. - Debounce did not work correct. The data direction is set in code but I can imagine that you prefer to set it yourself once. So feedback appreciated about this. - Added COM5-COM8 to the environment options for the terminal emulator. - Added CONFIG WAITLCD compiler directive. Specifying a value > 0 will result in waiting the number of specified mS after the last character has been sent. This is special user requested feature and is only usefull in some cases. - Added CONFIG I2CDELAY compiler directive. CONFIG I2CDELAY = 1 'will load the value of 1 into the timing register Normally the XTAL is used to calculate the value automticly. But for faster I2C you can use your own parameter. 1 is the minimum value otherwise you get a loop of 255. - Comparing bits resulted in Error 60 - MakeDec() function did not work for values > &H89 - LDS was not recognized by internal assmbler when used without ! - Added option to refer to the bitnumber of a bit. Bits are stored in bytes and when you must refer to a bit you must use: Dim B1 As bit Lds R16,{B1} 'load R16 with value of address of B1 Sbrs R16, BIT.B1 ' BIT. followed by the variablename of the BIT will replace the BIT.B1 with the memory position of the bit in the byte. In this case since B1 was the first dimensioned BIT, it is 7 So SBRS R16,7 will be generated. - Byte array address was not calulated correct. - Added sample for $SERIALINPUT - Added PushAll and PopAll statements to save/restore all used registers - Added sample simm100.bas for new AVR SimmStick - After Waitkey() or Inkey() the RX was disabled and not re-enabled. So INPUT did not work after this anymore. - Added .DBG output file for simulator testing and for next new feature. - Added check to programmer for chip=chip to program This will prevent you from programming a chip with wrong target code - Added LOG mode to the terminal emulator for logging output. - added support for PRINTBIN with channel(any port pin) - added support for INPUTBIN with channel(any port pin) - serial port was initialized when using LCD statement. This caused serial portpin not to function for other pusposes. - use of $REGFILE generated wrong OBJ files for AVR Studio. - Bit variables can be tested with BITWAIT too now. Dim B As Bit BitWait B, Set 'BUT take care that it will be set by your software, in an ISR for example otherwise you will have a loop that will not terminate. - timer1.bas sample did not mention that timer needed a clock for the pwm mode CLEAR DOWN parameter generated wrong setting. - 2333def.dat,4433def.dat, did not contain EEARL .equ needed by the compiler - 4433def.dat file contained wrong flashend value. Should be FF instead of 7F - Low() and High() functions optimized and fixed. - WAITMS was not accurate enough. Changed. Because WAIT uses WAITMS it is also more accurate. 1.0.0.5 08/29/1999 - Some users need MEGA chip code so these chips can be selected now. This is NOT the official release for the MEGA support however since the generated code is not tested in all aspects. - Added support for external programmers. - Added option to generate BIN and HEX files with the LSB and MSB reversed. This is needed by some programmers. - The DEFLCDCHAR statement displayed the first row on the last row. - Added support for multi 1 wire devices. The following statements/functions have additional parameters: 1WRESET , 1WWRITE , 1WREAD() - Fixed integer mul with 2 integers. Returned wrong result for values > 255. - Added check for 1wire being busy while giving a 1wreset. Err will return 1 if it was busy. - Added DAT files for the 90S2333 and the 90S4433 - Added code templates. Pressing CTRL+J will pop up the code template list. This way you can write standard code quicker. 08/15/1999 - Added PowerSave statement for 8535 chips. - Added support for TIMER2 in 8535. - Fixed Lookup() and optimzed the code for lookup. - Fixed SELECT statement. Parser generated an error. - Fixed LONG division routine - Fixed SHIFT and ROTATE RIGHT with LONGS. - Printing a BIT variable printed reversed value. - GetADC() returned value of previous conversion. Not documented in the pdf from Atmel but 2 conversions are needed for the right result. - STK200 programmer did not verified last byte. 08/03/1999 - Replaced NT driver for parallel port access for a faster one. - Added support for PG302 programmer. - Added support for STK200 programmer. - Fixed I2CREAD function. - Fixed software UART when used with 2 stop bits - Added GetKBD() function to scan a matrix keyboard. Config KBD= PORTB ' will define port B for the matrix key board ' The upper nibble of the port goes to the rows, the lower nibble of the port goes to the columns. var = getKBD() ' will return the key pressed. 16 if no key is pressed. - Fixed ABS() function. It did not work when assiging to another variable. - Fixed array problem with byte as an index.