Author |
Message |
|
rens
Newbie
Joined: 02 Apr 2010 Posts: 3
|
Posted: 02 Apr 2010 02:03:14 pm Post subject: |
|
|
Hi
I'm trying to add some extra hardware to my TI84+, I try, while using the miniUSB port to send Volt, add a relay and afther that maybe a lamb. I already got some cable's so I can easily get the Volt is a parallel port. When I click on my TI, link, send all, I can messure for half a second about 300mV, so the cable is working. Now I try to make my own program, but I cannot measure any difference after starting the program.
Code: DI;disable interrupts
ld a,$00\ OUT($03),A ;again trying to disable link interrupts
ld a,$AA\ OUT($0D),A ;sending byte
JR $-4 ;sending again, I know it is now a endlessloop, but still I should get some result on my VoltMeter.
I thank you in advance |
|
Back to top |
|
|
brandonw
Advanced Member
Joined: 12 Jan 2007 Posts: 455
|
Posted: 02 Apr 2010 03:32:41 pm Post subject: |
|
|
I'm not sure I really understand your post, but port 0D is used with the serial I/O port, not the mini-USB port. Accessing that port is nowhere near that easy; there are dozens of hardware ports used to interface with the USB controller.
You might see activity on the mini-USB port by selecting to send all from the LINK menu because the OS always tries to use the mini-USB link first if a cable is connected, otherwise it falls back on I/O. |
|
Back to top |
|
|
rens
Newbie
Joined: 02 Apr 2010 Posts: 3
|
Posted: 02 Apr 2010 04:25:14 pm Post subject: |
|
|
Ok, thank you for your reply. I'm sorry for my bad Englisch, but I'm not a native
I understand why there is activity near the USBport, that was just to test my cable
If port $0D is for the I/O, in what ports can I write what data I would like to send. I don't have to check if anonther calculator is ready or something, because I send my signal to a switch that will turn on a lamp. |
|
Back to top |
|
|
calcdude84se
Member
Joined: 09 Aug 2009 Posts: 207
|
Posted: 02 Apr 2010 05:41:53 pm Post subject: |
|
|
What documentation is there on the USB port interface, anyway? I do not personally want to have to read the usb8x source. |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 02 Apr 2010 06:54:05 pm Post subject: |
|
|
It might be possible to write the program using Usb8x as a library. That's what Usb8x is for, after all. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 02 Apr 2010 09:34:09 pm Post subject: |
|
|
rens: What exactly are you trying to do?
If you're building your own hardware from scratch, you will probably find it easier to use the classic link port, which can be controlled directly by the calculator CPU. The USB port is only for communicating with USB devices (it's driven by the calculator's hardware USB controller; as far as I know, there's no way for the CPU to directly control the USB lines.) So if you wanted to build your own device to connect to that port, it would also need to include a USB controller of some sort.
If you already have a USB device that you're trying to communicate with, you can probably do most of what you need using the usb8x API, and avoid having to deal with the nasty low-level details of the USB hardware. It's still going to take some work, though; USB is pretty messy by design.
calcdude84se: If reading the usb8x source scares you, writing low-level USB drivers may not be for you. |
|
Back to top |
|
|
rens
Newbie
Joined: 02 Apr 2010 Posts: 3
|
Posted: 03 Apr 2010 12:40:57 pm Post subject: |
|
|
[attachment=3155:PICT0005.jpg][attachment=3156:PICT0006.jpg]
What exactly are you trying to do, I try to use my TI as some kind of control pannel to turn lights on and off. I want to write a program myself where I can controll the lights. (If possible without bcall's). But I fail to get any activity out of the parallel port within my own prgm's. (cable is OK)
I dont use the I/O cable because I dont have one.
When I read for example at http://brandonw.net/calcstuff/USBroutines.txt I find only one routine to send using a one BCALL (and I don't wan't to use bcall's), and a couple to recieve, but cannot understand them and transfer them to a routine that sends. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 05 Apr 2010 09:47:38 pm Post subject: |
|
|
It looks like you are using a standard-A-to-mini-B cable, connected to a gender changer, connected to the USB device. It doesn't surprise me that that doesn't work.
Some basic (slightly oversimplified) USB facts:
- Every USB system consists of one host (normally a PC), and zero or more peripherals.
- The host is the device that supplies power to the system, as well as telling all the other devices what to do.
- Peripherals are not allowed to speak unless they are spoken to (and in fact, as a rule, peripherals are not allowed to do anything until the host supplies them with power.)
- Thus, it makes no sense to have more than one host on the same bus, or to have two peripherals connected to each other with no host.
- "A" cables are always connected in the peripheral-to-host ("upstream") direction.
- "B" cables are always connected in the host-to-peripheral ("downstream") direction.
- Dual-role devices, such as the TI-84 Plus, can accept either a mini-A or mini-B plug, and set themselves to host or peripheral mode accordingly.
- "USB gender changers" are an abomination, violate the USB specification, and I honestly can't think of any reason why they would have been manufactured in the first place.
The easiest thing for you to do would be to get a proper mini-A adapter cable (these are rather hard to find, but do exist; e.g., https://serialio.com//store/product_info.php?products_id=456 .) The calculator will detect that this is a mini-A rather than a mini-B plug, and set itself to host mode. You can then use usb8x to initialize and communicate with the peripheral device.
Otherwise... I think the calculator is supposed to be able to support HNP, so it might be possible to force the calculator into host mode, even with a B-cable connected. I have no idea how to do that, though; maybe Brandon does. You would still need to supply power to the bus somehow (such as using a powered hub.) And usb8x might or might not work in that case.
Also, you will probably not find any of the calculator's system routines useful; those routines are only intended for communicating with other calculators and TI-supported devices.
Last edited by Guest on 05 Apr 2010 09:50:43 pm; edited 1 time in total |
|
Back to top |
|
|
|