Interest Group for Owners and Enthusiasts Interested in the AmigaOne X1000. Share your projects and ideas or concept, find people to work on your project, join other's projects.
- XCore Expert
- Posts: 955
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
Amiga's, Atari's, not Apple or PC. both platforms enabled there developers.Atari's GUI sucked
but was funtional. I choose Atari for it's other potentials. AtariST's internals where wide open
for hardware hack's witch I could list quit a few projects, ploters, video over radio, Tranputer...
I don't think many people are going to be interested in Amga's new box. I guess if you wanted
PowerPC platform with a cool link to develope and connect Xcores and like the price or the fact
the machine is wall bound, dosn't bother you, and you like linux and AOS mixxed then its OK.
That's a lot of if's and abstraction for me, It could be a nice tool for someone whom might want
to throw all that abstraction at Xcore for acedemia or whatever. We'll see if Amiga developers can
realize the potential of Xcore and if they do, perhaps then they could design a more affordable, less
power, less IBM more Xcore Type O Machine with a better abstration. The company still has GONAS
being 1st Xcore to User in markets. Now if they only knew what they have...
Being into robotics, and machine prototypying i'll try to find some useful paths for it.
Using the Xena to Nemo GPIO on the AmigaOne X1000.
The on-board Xmos chip, Xena, has a one pin port that is connected
to the PA6T CPUs GPIO controller. This is Xena port P1F on XCORE 1
and is wired to GPIO4 in the CPU on the Nemo motherboard.
This pin and the corresponding GPIO input are normally in the HIGH
state and is considered to be active when set to a logic '0' or LOW.
To use the GPIO from the Xena side it is necessary to first configure
the port for OUTPUT by including a line in your program code as follows,
on stdcore  : port out gpio4 = XS1_PORT_1F;
the gpio4 designation can be replaced with whatever you like.
To activate the GPIO output it is only necessary to write a zero to
the port using xc standard code.
gpio4 <: 0;
or variables can be assigned to indicate LOW and HIGH values.
unsigned short setOFF = 1;
unsigned short setON = 0;
gpio4 <: setOFF;
gpio4 <: setON;
On the Nemo side of things you will need to monitor the PA6Ts GPIO
input register to sense any change applied by Xena. The hardware
address of this register is 0xfc103040 in hexidecimal.
You can view where this register is by using the F key to break the
startup as soon as the Menu appears on the X1000, then enter the
following at the CFE> prompt,
show soc sdc.sdcgpio
Notice the line beginning 0xFC103040 is marked as 'in' at the end.
The Value for that address should end in D5. This value is what we
will be looking at to see if Xena has applied a LOW (0) to the input
of the GPIO controller.
D5 in Hex translates to 1101:0101 in Binary. Also, in Binary the bit
positions are kind of backwards being labeled 7-0 from left to right.
The only bit we are interested in is bit 4. By setting bit 4 LOW the
value becomes 1100:0101 or 0xC5. (Using the 0x before Hex numbers is
a standard way of designation).
We simply want to monitor bit 4 and don't really care about the other
bits so we will use a C method known as 'Bit manipulation' or
'bit twiddling'. To test a bit we use,
bit_field & (1 << bitnumber);
In our case 'bitnumber' is 4. Therefore, bit_field & (1 << 4);
We want to set the bit_field variable to as small an amount as
needed. Unfortunately the smallest integer number we can use is
16 bits wide, however character values are only 8 bits wide, so
we will use the C language 'char' variable and assign it thus,
Now we have, gpio4 & (1 << 4);
Which says compare bit 4 of gpio4 to 1.
Now we need to set gpio4 char to look at our gpio controller.
gpio4 = *(char*)0xfc103040;
Which sets gpio4 to look at the 8 bit value located at 0xfc103040.
We can now monitor and print out the value of GPIO4 by including
in our Nemo code,
gpio4 = *(char*)0xfc103040;
if((gpio4 & (1<<4)))
After digging around in CFE to find where the GPIO portion of
the PA6T was I needed a way to determine exactly which bit was
indeed related to GPIO4.
To accomplish this I wrote a small Xmos program that toggled the
pin connected to GPIO4 on and off in 10 second intervals and used
the excellent FileX program by Alfred Faust, available on OS4Depot,
to monitor the GPIO 'in' section.
Using the 'Grab memory' function of FileX and entering values of
Start fc103040 and End fc103044 I could see the first value change
from D5 to C5 in harmony with Xena's toggling of its output port.
(I also toggled the on-board LED in unison with the GPIO port.)
Nemo was designed to use this gpio scheme and as a test of its
durability I ran the Xena toggle program more than 24 hours without
mechanic on amigans.net and happy to discuss this. :)
Who is online
Users browsing this forum: No registered users and 86 guests