Go to advanced search

by heuristicjohn
Sun Mar 17, 2013 11:58 am
Forum: RISCOS
Topic: Interrupt servicing via BASIC ?
Replies: 21
Views: 5373

Re: Interrupt servicing via BASIC ?

Theo - many thanks for your very helpful posting - exactly what I was looking for.

(to quote Gershwin) There may be troubles ahead ....

PS I understand that Bruce Smith Vol II will indeed cover this topic, so I have a fallback as well. Not that I'm a pessimist.
by heuristicjohn
Sat Mar 16, 2013 12:57 pm
Forum: RISCOS
Topic: Interrupt servicing via BASIC ?
Replies: 21
Views: 5373

Re: Interrupt servicing via BASIC ?

It sounds like you know what you are doing Flattering, but if this were the case I'd be offering rather than seeking advice ! Yes, handling interrupts may be complex and require care (and knowledge), so let's find the documents which spell out the necessary steps, and start writing code (or maybe w...
by heuristicjohn
Thu Mar 14, 2013 12:54 pm
Forum: RISCOS
Topic: Interrupt servicing via BASIC ?
Replies: 21
Views: 5373

Re: Interrupt servicing via BASIC ?

Hi Heuristicjohn, Is possible to periodically check the appropriate register and then code accordingly? I guess maybe not because you would have done that already? Hello Markodius ! Thanks for your comment. I have used this approach in the past, but it's a bit like having a sports car and only driv...
by heuristicjohn
Mon Mar 11, 2013 12:50 pm
Forum: RISCOS
Topic: Interrupt servicing via BASIC ?
Replies: 21
Views: 5373

Interrupt servicing via BASIC ?

I would like to be able to call a BASIC/assembly language program in response to an interrupt input. Setting up a GPIO pin is straightforward (BCM2835 handbook p90+ ), and applying an input duly results in the correct bit being set in the Event Detect Status Register. After this it gets difficult. I...
by heuristicjohn
Fri Mar 08, 2013 11:38 am
Forum: RISCOS
Topic: I2C Access
Replies: 79
Views: 16337

Re: I2C Access

My problem is that each of these commands works on its own, but when I execute them in sequence I get the error message "no acknowledge". (after deep thought): (1) so it must be a timeout problem, and (2) so the workaround is to put a short time delay (10 ms ?) between successive writes (reads are ...
by heuristicjohn
Thu Mar 07, 2013 5:24 pm
Forum: RISCOS
Topic: I2C Access
Replies: 79
Views: 16337

Re: I2C Access

I just checked the one on the download link on this site is from 01/11/2012 version RC6
Sorry - yes, that is the exact version number. Shall have to keep a beady eye open for the next release. Thanks for your help !
by heuristicjohn
Thu Mar 07, 2013 4:01 pm
Forum: RISCOS
Topic: I2C Access
Replies: 79
Views: 16337

Re: I2C Access

Are you using the development build? I don't think the fix has made it into the normal distribution yet as I don't think there has been a release since this bug was spotted. I downloaded RISCOS on February 5th, so it's fairly recent - regret to say I can't quote the version number, as I don't know ...
by heuristicjohn
Thu Mar 07, 2013 3:31 pm
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Re: Paralle data entry

Query: are there any hidden pitfalls in writing directly to I/O registers ? All the information is in the BCM2835 handbook pages 90-97, and the only system calls required appear to be one to set memory location, and two to move from User to Supervisor mode and back, when accessing the registers. Thi...
by heuristicjohn
Thu Mar 07, 2013 3:17 pm
Forum: RISCOS
Topic: I2C Access
Replies: 79
Views: 16337

Re: I2C Access

I would much appreciate advice on the following : I am attempting to write data to an EEPROM on the I2C bus (under RISCOS). The device is at address &50, and in the example I write &56 to internal memory location &1234. I then set the memory pointer using a write without data, and then read back the...
by heuristicjohn
Sat Feb 23, 2013 12:58 pm
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Re: Paralle data entry

It turns out that parallel data entry on the RPi is not a problem. Using information gleaned from the various forums, I have written program in BASIC, BASIC+ assembly, and using direct register access, and find that read times for one byte are about 300, 30 and 15 microseconds respectively. The fast...
by heuristicjohn
Mon Feb 18, 2013 12:18 am
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Re: Paralle data entry

I currently use a commercial PIC-based micro running BASIC, and this works well, reading a single byte in 90 microseconds using just three instructions (selectchip, read data, deselect Following up guidance provided, I have written a simple BASIC program which reads 8 GPIO inputs and performs a wei...
by heuristicjohn
Thu Feb 07, 2013 3:02 pm
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Re: Paralle data entry

Following up guidance provided, I have written a simple BASIC program which reads 8 GPIO inputs and performs a weighted addition, simulating a normal parallel port. Good news: it works - bad news, it takes 450 microseconds per read. (Ten times faster would be nice). Moving eight data bits from one m...
by heuristicjohn
Sun Feb 03, 2013 11:12 am
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Re: Paralle data entry

Many thanks for helpful replies. I downloaded the GPIO manual (had to run !PackMan update for it to appear on the list). A brief look suggested you can set individual IO pins but I did not see references to GPIO.set(PIO,OUT) and GPIO.output(PIO,x) which have been mentioned elsewhere. Sadly, when I r...
by heuristicjohn
Fri Feb 01, 2013 8:56 pm
Forum: RISCOS
Topic: Paralle data entry
Replies: 20
Views: 4807

Paralle data entry

Advice needed please: can the RPi (under RISC OS and BASIC) cater for parallel data entry ( eg by designating 8 GPIO lines as a parallel port) ? I have an application where I want to read a 24-bit counter as fast as possible, as often as possible. I currently use a commercial PIC-based micro running...

Go to advanced search