Driver for a CD22M3494 cross point switcher
Library description
The CD22M3494 is a 16x8 crosspoint switch matrix, it can be used in any configuration i.e. 16 ins' 8 outs' or 16 outs' and 8 ins'. Control of the chip is pretty simple there are two parallel address buses a 4 byte address controls the X axis (16 IO pins) and a 3 byte address controls the Y axis (8 IO pins). A data bus says whether to open or close the switch and a 'strobe' bus actually performs the switch. This library provides a simple interface to control the CD22M3494 and provides a mechanism to associate source and destinations in pairs and switch the pairs via their names.
Diff: CD22M3494.h
- Revision:
- 14:7cb4d76170b2
- Parent:
- 13:ee719eb11161
- Child:
- 15:f0a218113b15
diff -r ee719eb11161 -r 7cb4d76170b2 CD22M3494.h --- a/CD22M3494.h Tue Jan 14 13:55:56 2014 +0000 +++ b/CD22M3494.h Wed Jan 15 13:47:15 2014 +0000 @@ -111,13 +111,13 @@ /**Conucts a new CD22M3494 object * - * @param x0 the pin name for the first byte of the x axis address - * @param x1 the pin name for the second byte of the x axis address - * @param x2 the pin name for the thrid byte of the x axis address - * @param x3 the pin name for the forth byte of the x axis address - * @param y0 the pin name for the first byte of the y axis address - * @param y1 the pin name for the second byte of the y axis address - * @param y2 the pin name for the thrid byte of the y axis address + * @param x0 the pin name for the first bit of the x axis address + * @param x1 the pin name for the second bit of the x axis address + * @param x2 the pin name for the thrid bit of the x axis address + * @param x3 the pin name for the forth bit of the x axis address + * @param y0 the pin name for the first bit of the y axis address + * @param y1 the pin name for the second bit of the y axis address + * @param y2 the pin name for the thrid bit of the y axis address * @param d the pin name for the data bus * @param str the pin name for the strobe bus * @param rs the pin name for reset. @@ -126,10 +126,10 @@ xbus = new BusOut(x0, x1, x2, x3); ybus = new BusOut(y0, y1, y2); data = new DigitalOut(d); - obe = new DigitalOut(str); + strobe = new DigitalOut(str); reset = new DigitalOut(rs); data->write(0); - obe->write(0); + strobe->write(0); reset->write(0); crosspointLookup[X0] = X0I; crosspointLookup[X1] = X1I; @@ -161,7 +161,7 @@ delete xbus; delete ybus; delete data; - delete obe; + delete strobe; delete reset; associationTable.clear(); delete &associationTable; @@ -183,10 +183,10 @@ ybus->write(y); // let the data busses settle before setting obe high wait_us(2); - obe->write(1); + strobe->write(1); // obe must be high for at least 20 ns wait_us(1); - obe->write(0); + strobe->write(0); INFO("Done"); return true; } @@ -210,10 +210,10 @@ ybus->write(y); // let the data busses settle before setting obe high wait_us(2); - obe->write(1); + strobe->write(1); // obe must be high for at least 20 ns wait_us(1); - obe->write(0); + strobe->write(0); INFO("Done"); return true; } @@ -274,7 +274,7 @@ BusOut *xbus; BusOut *ybus; DigitalOut *data; - DigitalOut *obe; + DigitalOut *strobe; DigitalOut *reset; map<string, Association*> associationTable; map<string, unsigned short> crosspointLookup;