[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple II Pi



On Saturday, 25 May 2013 18:23:56 UTC+10, Michael J. Mahon  wrote:
 
> I'm still amazed that the RPi chip (apparently) is so unlike a
> 
> general-purpose microcontroller that it doesn't have a single-address 8-bit
> 
> port. ;-( I suppose that's what happens when you re-purpose a phone
> 
> processor!

The Broadcom part has 57 GPIO lines, all of which can overloaded to perform a variety of other functions (SPI, I2C, and the UART Dave is using).

The chip registers are all understandably 32-bit, with the first 32 GPIO's mapped to one register set, and the remainder to another. Read and write are separate registers, and write is separated again into set and clear registers. That's the main annoying part, as that seems completely superfluous to me ?

The rest of the 'problem' is that only 19 of the 57 lines are broken out on the RPi, and the ones chosen make it impossible (even if you configure them all as GPIO) to get 8 consecutive bits in the register, let alone have them fall on a byte boundary :-(

I suppose the designers figured the majority of users will be bit-banging rather than byte-banging. It's relatively straightforward in C to remap a byte-sized quanta appropriately if you wanted to work around it. 

I expect though that the majority simply use the virtual-filesystem interface that can be effortlessly exploited in <insert-your-favourite-scripting-language>

Matt