My ongoing troubles with using the ax5214h driver with an Acess DIO-48 card 
may be of assistance to some others.
  I checked the Axiom manual for the card, and discovered that the three 
most significant bits of the 8255 control reg. were pre-empted in some way 
on the board. This resulted in " dont care" status for those 3 bits. the 
Acess board uses the full register set of the 8255, So a simple mod to the 
driver:
Snip;
====================================
     msg = rtapi_get_msg_level();
     rtapi_set_msg_level(RTAPI_MSG_WARN);
     retval = 0;
     config = 0;                 ( CHANGE TO: config = 0x80; )
     dir = board->dir_bits & 0x01;
     retval += export_port ( boardnum, 0, &(board->port_1A[0]), 8, dir );
     if ( dir == 0 ) {
         config |= 0x10;
=====================================
set the msb of the control port to allow direction configuration of ports 
a,b and c. ( do the same for second chip )
IT WORKS!!
Only trouble was:    when I used halrun, and  loadrt hal_ax5214h etc. etc, 
all the outputs came on.
after making thread, addf etc, start, they react normally. ( frantic time 
trying to remember what to do as the power was
temporarily on the i/o for testing )
So back to the drawing board. The 8055 defaults to all inputs on 
power-up/reset , probably can't write to inputs,
So - - - -  a simple mod to the driver:
Snip;
=====================================
   /* initialize hardware - all outputs high
         (since outputs are active low) */
( NEW )    outb(board->port1config, board->base_addr+3);
     outb(0xff, board->base_addr+0);
     outb(0xff, board->base_addr+1);
     outb(0xff, board->base_addr+2);
  ( OLD )    outb(board->port1config, board->base_addr+3);
  ( NEW )   outb(board->port2config, board->base_addr+7);
     outb(0xff, board->base_addr+4);
     outb(0xff, board->base_addr+5);
     outb(0xff, board->base_addr+6);
   (OLD )     outb(board->port2config, board->base_addr+7);
     /* restore saved message level */
     rtapi_set_msg_level(msg);
     return retval;
}
=====================================
Place the control register write before the initialisation bits. ( I guess )
remove the old, and replace with the new lines.  ( out with the old and in 
with the new ? )
IT WORKS! Really works, all outputs are off on loading the driver, all i/o 
is as it is configured.
My compile method?   download source and GCC etc. and compile the whole 
shebang !!
Aboriginal sledgehammer approach. But it works! (git er done 
)   Perserverance pays.
( It might be interesting if someone with the Axiom card found out what 
happens when they load the driver )
hope all this helps someone.
Dave
Dave B.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to