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 年 09 月 10 日
11:40:56
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

I modified a Servo library for linux, download it from: http://www.roboard.com/temp/Servo2.zip
A demo code named Servo2.cpp used PWM pins(9 and 10) to send the continue PWM signal with 0 ~ 180 degree for Servo motor.
Try to compile it in linux and run.

Android_Lin

2020 年 04 月 22 日
22:18:10
jejump
Moderator
Forum Posts: 14
Member Since:
2015 年 02 月 22 日
Offline
22

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.
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

For what it's worth to anyone now....

I have figured out from Android_Lin's reply above, that 86Duino makes use of F202h for GPIO 0 direction, and F200h for GPIO 0 data. I spent weeks trying to make this be true and kept coming up with nothing. My biggest setback was because I had no peripheral test set up for any GPIO port pin. I was solely relying on the PIN 13 LED on the board as my indicator as to whether or not I was correctly addressing the port and pin (That would be F206 DIR, F204 DATA and doesn't pin 13 mean port 1, bit 3??? Anybody??). At the present moment, I don't know why that wasn't a sufficient test indicator. Seems like that should have worked just fine. However, it wasn't until I connected my logic probe to GPIO 06 that I was actually able to make a visible state change on a pin. So far, I've only tried GPIO 0 bit 6.

Another important step is enabling the port like Android_Lin said above. By default, they seem to be disabled or un-configured. I never figured out the "PCI South Bridge" method for configuring ANYTHING. I was however, able to communicate with the PCI configuration registers 0CF8h/0CFCh. I got the vendor ID and Device ID returned in the EAX register and that's where my success with PCI South Bridge ran out. I wrote a very simple program in FDOS DEBUG to handle that, and it's much more read-able than the C method I've seen somewhere. Laugh

In the data sheets, you will see multiple times over "BA refers to the register of index 63h, 62h" when trying to formulate an address in PCI land. I never figured out how these vales apply to anything. Is 63h a high and 62h low to form a 16-bit something or other? Are they standard I/O space? Are they memory register locations? Let's just say that the -EX document leaves MUCH to be desired from its readers (at least, one of its readers). Even in Android_Lin's "Step 1" above, he says "access SouthBridge(SB) and set GPIO base address at 62h, 63h" and then no further elaboration.

I did find one effective method of enabling the GPIO hardware was to run "86crsbar.exe A" in the C:\Tools directory. 'A' just means set GPIO 1 to remove focus from the UART and become normal on/off bits. This sets things up "magically" somehow, leaves the GPIO in an enabled state and now you can access GPIO DATA/DIR registers F200h, F202h or F206h, F204h etc...

So after all that, what I have is a DOS-like computer that I can turn on/off GPIO bits or read them back in a high level language ONLY. For whatever reasons that be, my assembly language routines won't report the port reads correctly. This is a TSR routine that I wrote on a 486 laptop and it works flawlessly on that platform reading a printer port pin. I don't know if things happen too fast down low, or what the deal is on the 86Duino, but the port status never changes when read in my TSR. In QBASIC, the port reads and reports pin-state changes just fine.

I guess that'll have to be good enough for now. It's better than what I had before. I own two of these 86Duino ONE boards and have since November, 2018. Couldn't get it off the ground running (or walking, or crawling, or even positioned on its knees and hands), so I put it away for a long time. Finally spent all of last week digging into it again and this is where I am. I want soooo badly to fall in love with this product!! Mostly because it's a cheap PC. I, like the OP Dinosaur, want nothing from it as an Arduino compatible board with clunky libraries. You shouldn't need a 700KB executable to blink an on-board LED! Laugh

John

Forum Timezone: Asia/Taipei

Most Users Ever Online: 229

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

hippy: 9

smeezekitty: 8

lukeross: 8

tomka: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1573

Moderators: 15

Admins: 5

Forum Stats:

Groups: 2

Forums: 11

Topics: 248

Posts: 1114

Newest Members: Dennissot, bb4000, Ovendaanalolymn, Ling ChengYU, EROGurnedo, Alfredhak, Davidherie, Nelsonbok, EugeneDut, RobertOwell

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

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