Search found 417 matches

by cfbsoftware
Thu Jan 20, 2011 4:08 am
Forum: Getting Started
Topic: IIC how to
Replies: 5
Views: 21782

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: 8018

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: 8338

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: http://www.inf.ethz.ch/personal/wirth/...
by cfbsoftware
Wed Jan 05, 2011 5:05 am
Forum: Getting Started
Topic: interrupt(s)
Replies: 2
Views: 9822

Re: interrupt(s)

The attached demo program IRQFIQ which should run on LPC21xx and LPC22xx targets shows an IRQ being interrupted by an FIQ. It uses Timer0 to generate IRQs and Timer1 to generate FIQs. The IRQ handler stays in an infinite loop which only terminates when it is interrupted by an FIQ. If you need convin...
by cfbsoftware
Mon Jan 03, 2011 11:19 pm
Forum: Oberon Language
Topic: Forward Procedures
Replies: 1
Views: 5981

Re: Forward Procedures

There is no special mechanism used for forward procedures in Oberon-07. Normally procedures should be declared before they are referenced. The only time where it is necessary to use a forward procedure is if two procedures mutually call each other e.g. if you want to do something like: PROCEDURE Pro...
by cfbsoftware
Mon Jan 03, 2011 12:22 pm
Forum: Getting Started
Topic: IMPORT Main?
Replies: 1
Views: 5956

Re: IMPORT Main?

Main is not documented separately. It's a 140-line module which performs the following startup actions: Copies the interrupt area to mapped memory Installs the Trap Handler Sets Memory mapping control to User RAM Mode Enables the Memory Accelerator Module Initialises UART0 at 38400 baud for runtime ...
by cfbsoftware
Mon Jan 03, 2011 6:12 am
Forum: Oberon Language
Topic: Shifts and masks
Replies: 3
Views: 10386

Re: Shifts and masks

There are several possible ways. The style most often seen in Oberon code is: R := LSR(R, 6) MOD 0400H; The code generated is: E1B0B32BH MOV S R11,R11 LSR 6 E1A0BB0BH MOV R11,R11 LSL 22 E1B0BB2BH MOV S R11,R11 LSR 22 An alternative is: R := LSR(LSL(value, 16)); Initially this might appear less reada...