Search found 444 matches

by cfbsoftware
Mon Mar 21, 2011 9:35 pm
Forum: Oberon Language
Topic: Convert INTEGER to SET
Replies: 4
Views: 26016

Re: Convert INTEGER to SET

If you want to typecast an INTEGER variable to a SET variable use the general typecasting function SYSTEM.VAL. e.g. VAR s: SET; i: INTEGER; s := SYSTEM.VAL(SET, i); Examples: i = 0, s = {} i = 8, s = {3} i = 0FH, s = {0..3} i = 0AAH, s = {1, 3, 5, 7} i = 055H, s = {0, 2, 4, 6} Note that this doesn't...
by cfbsoftware
Sat Mar 12, 2011 5:39 am
Forum: Getting Started
Topic: Info example says the LPC2103 only has 8k
Replies: 1
Views: 17155

Re: Info example says the LPC2103 only has 8k

The LPC2103 has 32kB of flash *ROM* (program code) but only 8kB of RAM (program data). The Memory Available 7140 shown in the Info example refers to what is left of the 8kb of RAM. Have a look at Section 6.5 "Memory Map" in Astrobe > Help > Oberon for LPC Microcontrollers to see how the memory is al...
by cfbsoftware
Sun Feb 20, 2011 12:52 pm
Forum: Getting Started
Topic: advocating specific board entry on forum
Replies: 1
Views: 17754

Re: advocating specific board entry on forum

Hi Frans-Pieter, Thank you for your positive feedback and suggestion. I'm pleased to hear you are making good progress. For now I've just created one new forum for any topics that are related to specific development boards. If large numbers of topics for a particular manufacturer start to appear I c...
by cfbsoftware
Mon Feb 14, 2011 6:51 am
Forum: Oberon Language
Topic: Question about the Language
Replies: 2
Views: 19625

Re: Question about the Language

Thank you for your compliments :) Although Oberon-07 was designed by Niklaus Wirth, the designer of Pascal there are a few fundamental differences. Hence, not only are reserved words capitals only, but also all other identifiers are case-sensitive. Wirth introduced this change when he designed the l...
by cfbsoftware
Tue Feb 01, 2011 11:10 am
Forum: Oberon Language
Topic: Convert CHAR to INTEGER
Replies: 1
Views: 11665

Re: Convert CHAR to INTEGER

The built-in ORD function will typecast a CHAR to INTEGER i.e. VAR ch: CHAR; i: INTEGER; ... ... i := ORD(ch); This gives you the corresponding numeric ASCII value for that character. Knowing this, if you want to convert a single character (e.g. '9') to the integer value (e.g. 9) you can then say: I...
by cfbsoftware
Tue Jan 25, 2011 2:02 am
Forum: Getting Started
Topic: IIC how to
Replies: 5
Views: 39859

Re: IIC how to

cfbsoftware wrote:We'll post the updated I2C module here along with the EEPROM example.
These have now been uploaded to the Enhancements & Suggestions section of this forum.
by cfbsoftware
Sun Jan 23, 2011 5:56 am
Forum: Getting Started
Topic: IIC how to
Replies: 5
Views: 39859

Re: IIC how to

The reference to CAT24LC256 will be removed. In the process of working on the 256Kbit EEPROM example we've added a couple of extra functions to the I2C module to give greater control over the parameters. You will be able to specify the number of bytes (including 0) for both the params and data param...
by cfbsoftware
Thu Jan 20, 2011 4:08 am
Forum: Getting Started
Topic: IIC how to
Replies: 5
Views: 39859

Re: IIC how to

The EEPROM2K example supplied with Astrobe is designed for use with 2Kbit EEPROMs which use 8-bit location addresses. The 24LC256 is a 256Kbit EEPROM which uses 16-bit location addresses. Hence the variables idAddr and counterAddr need to be declared as 16-bit unsigned integer variables instead of 8...
by cfbsoftware
Thu Jan 13, 2011 12:49 pm
Forum: Getting Started
Topic: Use of IS
Replies: 1
Views: 17799

Re: Use of IS

That is not surprising - the related subject of type extensions is one of the more complex aspects of Oberon. Unfortuantely, I can't hope to explain it in a few sentences here. What I recommend you do is first of all have a look at the source code of the Extensions module in the Astrobe Examples fol...
by cfbsoftware
Thu Jan 13, 2011 12:13 pm
Forum: Getting Started
Topic: SET operators
Replies: 1
Views: 18610

Re: SET operators

Thank you for your feedback - much appreciated. There's a lot more to come if there is sufficient interest :) Niklaus Wirth has written a paper on the use of SETs titled "SET: A neglected data type and its compilation for the ARM". You can download a copy from: https://people.inf.ethz.ch/~wirth/Ober...