Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
I/O Register
2014 年 05 月 14 日
11:44:11
Dinosaur
Member
Forum Posts: 27
Member Since:
2014 年 01 月 06 日
Offline

Hi All

Where can I find / download addresses for all I/O ports.?
I need to read/write every I/O bit without using C libraries.

Regards

Regards
2014 年 05 月 15 日
01:41:22
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline

You can refer to the Vortex86EX datasheet for I/O-register address: http://www.86duino.com/wp-cont.....6duino.pdf

2014 年 05 月 15 日
05:13:04
Dinosaur
Member
Forum Posts: 27
Member Since:
2014 年 01 月 06 日
Offline

Hi All

Reading that document has left me confused, for example;
Index Port (22h) = 4Fh, Data Port (23h) definition, Default Value 00h

This refers to setting the direction of GPIO Port 1
To translate that into lets say a programming statement to set the port to input.
Out port,value
The value will be zero for input.
What is the value ? 22h or 4Fh

Secondly, where do I find a cross reference list between GPIO port 1 bit 0, and the educake pin ?
Please don't say I have to follow the pins on the circuit diagrams, somewhere there must be a list that
cross references cpu pin to educake breadboard pin.

Regards

Regards
2014 年 05 月 15 日
13:28:22
cucubutter
Moderator
Forum Posts: 84
Member Since:
2014 年 04 月 10 日
Offline

Hi:
If you want to set the GPIO registes, you can see the page.55 and page.260.
hope this can help ypu.

Regards

2014 年 05 月 16 日
05:29:57
Dinosaur
Member
Forum Posts: 27
Member Since:
2014 年 01 月 06 日
Offline

Hi All

Those are the pages that I got my example from.
I really need someone to give an example.
Normally in Dos I can write let's say to a serial port by:
Out &H3f8, Data

The 86Duino uses register multiplexing, so writing to a port becomes more involved.
If some one can give an example of how to write to the port (example in previous post)
then I can follow it from there.

Regards

Regards
2014 年 05 月 16 日
15:42:41
cucubutter
Moderator
Forum Posts: 84
Member Since:
2014 年 04 月 10 日
Offline
2014 年 05 月 16 日
17:39:31
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline

Dinosaur said
...

Secondly, where do I find a cross reference list between GPIO port 1 bit 0, and the educake pin ?
Please don't say I have to follow the pins on the circuit diagrams, somewhere there must be a list that
cross references cpu pin to educake breadboard pin.

Regards

Hi,
Refer to the PDF file as below:
http://www.roboard.com/Files/8.....19a_05.pdf
You can find the cross reference list between GPIO and educake pins on first page. :)

2014 年 06 月 05 日
05:18:47
Dinosaur
Member
Forum Posts: 27
Member Since:
2014 年 01 月 06 日
Offline

Hi All

Still having huge difficulties understanding the spec on how the GPIO bits are programmed.
The Vortex86ex data sheet is very difficult to read and I cannot get a proper procedure from it.
The wording is so convoluted, where a simple explanation would do.
I guess nobody else is interested in writing their own code, so pointing me to the IDE steps for programming bits is useless.

I have programmed the other Vortex cpu's using standard I/O space from 170H through to 1B0H with simple instructions in Industrial
machines for a years. The EX has a complex arrangement of registers, and from my reading you have to calculate what the addresses are.
DMP have put out a Programming reference for the Sx,DX & MX series but I cant find one for the EX.
If there was a Library that I can link to my code, then at least I can use the same functions, without reinventing the wheel.

1. Is there a programmers reference.. ???
2. Is there a Library.???
3. Is there anybody out there supporting this product ???YellYellYellYell

Next step is garbage bin.

Regards
2014 年 06 月 05 日
12:13:08
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline

Hi,
The GPIO's base addresses need to be configured on EX (mean those addresses are not fixed). If not configure them, GPIO function is disable. A simple method to configure them as below for reference 86Duino source code:

1. access SouthBridge(SB) and set GPIO base address at 62h, 63h. For 86Duino, it is set as 0xF100 in standard I/O space. You can set another as you like (recommend to set a high address). Access SB method for refer to ftp://ftp.dmp.com.tw/DMP_Vorte.....091216.pdf.
2. access address 0xF100 (standard I/O space), set GPIO enable bit (0xF100h ~ 0xF103h).
3. set 0xF104 ~ 0xF107 for GPIO0's DIR base address and DATA base address, 0xF108 ~ 0xF10B for GPIO1's DIR base address and DATA base address and so on. For 86Duino, GPIO0's DIR address is set as 0xF202 and DATA address is 0xF200, GPIO1's DIR address is set as 0xF206 and DATA address is 0xF204 and so on.
4. access 0xF200 and 0xF202, you can use GPIO0, access 0xF204 and 0xF206 to use GPIO1 and so on.

In addition, to output GPIO signal, need to configure CORSSBAR as below:

1. set CROSSBAR base address at SB 0x64, 0x65. For 86Duino, it is set as 0x0A00 (standard I/O space).
2. start to access CROSSBAR function from address 0x0A00.
For reference, https://gist.github.com/nonakap/9045101.
(posted from http://www.86duino.com/?page_i.....on-educake)

Regards

2014 年 07 月 30 日
10:38:10
Ray
New Member
Forum Posts: 3
Member Since:
2014 年 07 月 17 日
Offline
10

Android_Lin said

Hi,
The GPIO's base addresses need to be configured on EX (mean those addresses are not fixed). If not configure them, GPIO function is disable. A simple method to configure them as below for reference 86Duino source code:

1. access SouthBridge(SB) and set GPIO base address at 62h, 63h. For 86Duino, it is set as 0xF100 in standard I/O space. You can set another as you like (recommend to set a high address). Access SB method for refer to ftp://ftp.dmp.com.tw/DMP_Vorte.....091216.pdf.

Regards

FTP site need login account and password. Where can I get that?

2014 年 07 月 30 日
22:51:29
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline

Hello, Ray:
Download it here Smile

Regards
Android_Lin

2014 年 08 月 07 日
07:36:00
hippy
New Member
Forum Posts: 8
Member Since:
2014 年 08 月 07 日
Offline
12

Hi!

I love the educake, it's a great unit!!

I have a linux buildroot system, boots in 4 seconds to linux serial console, 6 seconds with dropbear SSH.

I have most things working, but have a question about the document ftp://download@ftp.dmp.com.tw/.....091216.pdf

What is the difference with Vortex86EX compared to DX, MX, SX??

I will write some programs to share, that makes gpio easy, but want to make sure the registers are correct.

Is the EX the same as the DX for registers? what is the differences?

Cheers,
Hippy Laugh

2014 年 08 月 08 日
21:38:13
Kato Gangstad
New Member
Forum Posts: 7
Member Since:
2014 年 07 月 24 日
Offline
13

Can't wait hippy !
Been waiting for this.

Thanks !Cool

2014 年 08 月 12 日
09:40:36
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline

Hi Hippy,

Vortex86EX has more rich I/O than DX, MX, SX, but with a complex I/O mux scheme: http://www.86duino.com/?page_i.....agram#p452 (in general, users don't need to modify the mux setting by themselves.)

On 86Duino, the access of GPIO is basically compatible to DX/MX except the GPIO base address isn't set initially. So to access GPIO without the Arduino API, the user must first manually set the GPIO base address, and, then, use the DX/MX method to access GPIO of 86Duino.

The base address of the direction and data registers of a Vortex86EX GPIO port can be set separately; and you can read/set the base address of a GPIO via the GPIO Port Config Registers, whose detailed information can be found in section 11.3.18 of Vortex86EX datasheet.

2014 年 08 月 12 日
16:32:00
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline
15

Hi, hippy
In 86Duino program for reference, GPIO port I/O addresses are configured as below:

http://www.roboard.com/temp/GP.....s_list.bmp

The configured steps:

http://www.roboard.com/temp/Co.....method.bmp

In addition, you also need to switch Port-Crossbar to GPIO function. Then you will get GPIO signal from GPIO pin.

2014 年 08 月 12 日
16:34:34
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline
16

On 86Duino One, the GPIO pins define on two sides display as below:

http://www.roboard.com/temp/ex.....e_pins.bmp

You can find pin define table on the first page of 86Duino One schematic:

http://www.roboard.com/temp/on.....define.jpg

On EduCake or Zero, you also can find it like below:

EduCake:

http://www.roboard.com/temp/ed.....define.jpg

Zero:

http://www.roboard.com/temp/ze.....define.jpg

2014 年 09 月 05 日
12:43:26
hippy
New Member
Forum Posts: 8
Member Since:
2014 年 08 月 07 日
Offline
17

Thank you guys!

From linux I now have the crossbar controllable, and have rerouted hardware SPI to educake pins I can use, hooray!

I can also compile of your 86duino libraries (with modifications) many libraries under linux too, but how can i use the servo library?

It includes dos.h and irq_dos.h, but no linux interrupt stuff. but I really just now need to control two servos, and my prototype will be complete.

Can i control the mcm from linux? I think the interrupt is the problem? Do you have some way to do it? Also, why is interrupt needed for a servo output? I only need two servo.

I have a project which needs two servos working from linux, how can it be done? I wish to build very many units, but need a quick solution for gcc linux vortex86ex.

I plan to release my code too, but i need it working first :)

Cheers,
Hippy

2014 年 09 月 06 日
00:24:55
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline

hippy said
Can i control the mcm from linux? I think the interrupt is the problem? Do you have some way to do it? Also, why is interrupt needed for a servo output? I only need two servo.

Hi, the servo library uses the interrupt to generate PWM pulses on non-PWM pins; and this interrupt-method cannot be realized on linux without writing a driver. But if you need only two servos, you can use only the PWM pins (3,5,6,9,10,11,13,29~32), which require no interrupt to send PWM. If the servo library is modified to use only PWM pins, it can be compiled under linux. I will inform Android Lin to make such a linux servo library for you when he returns from his vacation next week (at 9/9).

Also for reference, the following provides some hints to make the servo library compiled under linux:

1. remove all codes that call disable_MCINT() and enable_MCINT().
2. remove all codes that call the irq_xxxx() functions.
3. change "set_MMIO();" to "set_PortIO();" in the hardware/86duino/x86/cores/arduino/wiring.cpp to force the mcm library to avoid the use of memory-mapped I/O under linux.
4. call Servo.attach() only on PWM pins.

2014 年 09 月 06 日
08:29:02
hippy
New Member
Forum Posts: 8
Member Since:
2014 年 08 月 07 日
Offline
19

Thanks Roboard,
Oh good, thank you. You guys are great, very happy with the product and support!

I have #ifndef DMP_LINUX all the interrupt code, and have compiled now. I will test soon, though I think it will probably work fine!

Many thanks, no need to have Android_lin make a library just for me Laugh

I would like to have a small simple example of how to read a rotary encoder though, with the FIFO so I don't miss any turns?

Cheers,
Hippy

2014 年 09 月 09 日
20:44:37
Android_Lin
Moderator
Forum Posts: 211
Member Since:
2014 年 04 月 01 日
Offline

hippy said

I would like to have a small simple example of how to read a rotary encoder though, with the FIFO so I don't miss any turns?

Hi, hippy,
assume the encoder rotates along same direction (ex. clockwise), a simple example can read encoder counter for A/B phase pulse and get the turning number:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "Encoder.h"

volatile int inumber = 0;
void encoder_callback(int flag) {
  if(flag == INTR_INDEX) // if it is interrupted by index signal
    inumber++; // accumulate the turning number
}

void setup() {
  Serial.begin(9600);
  Enc0.begin(MODE_AB_PHASE); // set encoder mode to A/B phase
  Enc0.setIndexReset(); // if the encoder index signal (pinZ from LOW to HIGH) income, reset
                                           // internal encoder pulse counter to 0.
  Enc0.attachInterrupt(encoder_callback); // enable interrupt and set callback function
}

void loop() {
  Serial.print("count = ");
  Serial.print(Enc0.read()); // read encoder pluse counter
  Serial.print(" ");
  Serial.print("index count = ");
  Serial.println(inumber); // print turning number
  delay(100);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

As the above example, it used interrupt method to get index signal event and be compiled by 86Duino IDE.
For linux, you may need to use polling method (ex. indexRead()) to get index signal (pinZ) status instead of interrupt method.

Android_Lin

Forum Timezone: Asia/Taipei

Most Users Ever Online: 66

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

lukeross: 8

tomka: 8

smeezekitty: 8

hippy: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1537

Moderators: 14

Admins: 5

Forum Stats:

Groups: 2

Forums: 10

Topics: 239

Posts: 1082

Newest Members: dimka, elihu, Woodrowcercraby, Robertnalty, Homerwoppy, RonaldLew, JesusMycle, Georgerek, wholesalewholes, involy

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 211, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 20, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 0