Shop OBEX P1 Docs P2 Docs Learn Events
useing ti86 calculator to interface with BS2homework board? — Parallax Forums

useing ti86 calculator to interface with BS2homework board?

iamdenteddiskiamdenteddisk Posts: 66
edited 2008-05-25 06:28 in Robotics
Hi to all, I am currently trying to find any documentation/info on interfaceing my BS2 homework board with my ti86 calculator I have all known docs for both, they both are i2c compliant devices and software for this is well documented on both devices but my question is "what support circuits are required to protect both from overcurrent" ? has anyone done one of these ?

·My project is a hexbug I have implemented a pir motion·sensor,piezio spkr,some led's,and light detection,and some door switches from an aircondition supply house for the bugs antanna ,2servos ,photo resistor ,solor power charger -it all·seems to work well·for its design and im trying to eventually·put·them in my vegtable garden to scare any uninvited animals and maybe add another homework board to keep adding so I·can maybe use it to collect data and based on the data tend to things like watering,fertilizing,weeding,seeding . if these all work out·,all·I will have left to do is harvest. and im thinking that is just a few hundred dollars away too.

thanks parallax for the simple controler and its ease of use.

im now waiting on my new hardware to arive to build a data collection setup so·I want a way to graphicly view and change things without removeing them from garden.·The software·I got ,the 2 interface's I dont. can someone help?
*This is what I need*
1#info on interfaceing board to board useing i2c
2#info on interfaceing board to calc useing i2c

· As for now the watering job will be a second bugbot and as·I figure each bug and its devices run around $200 cost to build and 30 hours once done and the garden is·growing·I want to post about it all·and some movies of them in action.

Oh yeah aside from the calc interface the whole project would be an excelent plug for parallax·I wonder if they will offer sponsorship or a buydown on parts if I go commercial [url=mailto:.....iamdenteddisk@yahoo.com].....iamdenteddisk@yahoo.com[/url]
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-25 03:03
    Are you sure the TI86 is an I2C compliant device? I don't see anything in the TI documentation that I can find that would imply that.

    Here's a webpage with a lot of information on the TI Link protocol: www.ticalc.org/pub/text/calcinfo/

    Post Edited (Mike Green) : 5/25/2008 3:09:23 AM GMT
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 04:07
    yes I have documentation aswell as asm code for the link protocol,i2c isnt native but is possible useing asm on the calc I would like to share it with anyone willing to help..
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-25 04:18
    I suspect that the TI86 code is for an I2C master. The BS2 code is also for an I2C master. I'm not aware of any BS2 code for an I2C slave. It would be quite slow and probably would only work with another Stamp. You'd be better off by using an I2C I/O Expander like the PCF8574 on both the TI86 and the BS2. You could connect the PCF8574 I/O pins together with 470 Ohm resistors to protect against short circuits and you'd have an 8-bit bus connecting the two devices. The BS2 code can be found here: www.phanderson.com/stamp/i2c/8574.html

    Post Edited (Mike Green) : 5/25/2008 5:21:42 AM GMT
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 05:03
    I have it in a text file called i2c.txt I dont recall its source as i have reserched the ti86 for years and collected alot infact I have more documentation on ti calculators than ti.org aswell as my own stuff the i2c link is actully created by per Finander [noparse][[/noparse]pfimdt93@tufvan.hv.se] it is for the ti85 calculator I have built many of these for automation and pariphrials<spell< mice keyboards for my 86 here is a schematic



    +
    /-- --- ---| To TI85
    < |
    \-- --- ---|
    | | | +
    | | |
    | | Gnd
    | | +
    +
    | | | +
    + |
    | | | | +
    + | |
    | | | | | +
    + | | |
    | | | | | | | | | |
    | | +++ +++ +++ +++ | | | | ->
    | | 470 | | | | | | | | \---/ \---/ \---/ \---/
    | | Ohm| | | | | | | | \ / \ / \ / \ / ->
    +5V | | | | | | | | | |



    | | | +++ +++ +++ +++ | | | | ->
    | | | | | | | | | | |
    | | | | | | | | LED0 | LED1 | LED2 | LED3
    +--+ +--+ +--+ +--+ +--+ +--+ +--+ | | | |
    |16| |15| |14| |13| |12| |11| |10| | 9| +----+----+----+
    +
    + |
    | Vdd SDA SCL Int P7 P6 P5 P4 | |
    | | |
    +-+ | |
    | | PCF8574 | |
    +-+ | |
    | | |
    | A0 A1 A2 P0 P1 P2 P3 Vss | |
    +
    +| |
    | 1| | 2| | 3| | 4| | 5| | 6| | 7| | 8| |
    +--+ +--+ +--+ +--+ +--+ +--++-++--+ |
    | | | | | | | | | |
    | | | o | o | o | o | | | |
    | | | -+ -+ -+ -+ | | |
    | | | o | o | o | o | | | |
    | | | | S0 | S1 | S2 | S3 | |
    | | | | | | | | | |
    +----+----+----+----+----+----+----+
    +
    |
    - Gnd

    sorry but this didnt copy/paste right and after 20 min of trying to fix it,you get the crooked version ,below is the asm you can also contact me or its auther if he's still with us for the compleate file .
    my email : iamdenteddisk@yahoo.com

    ;
    ; 2
    ; I C routines for ZShell 4.0
    ;
    ; Per Finander, 1996
    ; e-mail: pfimdt93@tufvan.hv.se
    ;
    ; +
    ; /-- --- ---|
    ; < | To TI85
    ; \-- --- ---|
    ; | | | +
    ; | | |
    ; SDA SCL Gnd
    ;
    ;

    ; (updated 31 May 1996)

    ;
    ; Send I2C Start pulse
    ;

    I2CStart:
    ld a,$C0 ; SDA 1 ""\
    CALL_(I2CDT) ; 0 \_____
    ld a,$C4
    CALL_(I2CDT) ; SCL 1 """""\
    jr I2CDT ; 0 \__

    ;
    ; Send I2C Stop pulse
    ;

    I2CStop:
    ld a,$CC ; SDA 1 /""
    CALL_(I2CDT) ; 0 _____/
    CALL_(I2CDT)
    ld a,$C0 ; SCL 1 /"""""
    jr I2CDT ; 0 __/


    ; Send A to I2C bus
    ;
    ; In : A - Byte to send
    ; Out: CF - =1 if no acknowledge was returned (error)


    I2CSend:
    push bc
    ld b,$08
    I2CNextB:
    rlca
    push af
    ld a,$CC
    jr nc,I2CNotS
    xor $04
    I2CNotS:
    CALL_(I2CPulse)
    pop af
    djnz I2CNextB
    ld a,$C8
    CALL_(I2CPulse)
    rr c
    pop bc
    ret


    ; Read byte from I2C bus, Send an acknowledge
    ;
    ; Out: A = byte


    I2CReadA:
    ld a,$CC
    jr I2CRead1

    ; Read byte from I2C bus, Don't send an acknowledge
    ;
    ; Out: A = byte

    I2CRead:
    ld a,$C8
    I2CRead1:
    push bc
    push af
    ld b,$08
    xor a
    I2CGetB:
    push af
    ld a,$C8
    CALL_(I2CPulse)
    pop af
    rr c
    rla
    djnz I2CGetB
    ld b,a
    pop af
    CALL_(I2CPulse)
    ld a,b
    pop bc
    ret

    I2CPulse:
    CALL_(I2CDT)
    CALL_(I2CDT)
    ld c,$07
    in c,(c)
    I2CDT:
    out ($07),a
    xor $08
    ret
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 05:07
    sorry agian the schematic still goofed somehow"i guess they dont want schematics here you can contact me I will send it as atachment if you want it.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-25 05:43
    Post your schematic between [noparse][[/noparse]code] and [noparse][[/noparse]/code] tags. Then your spacing will come out the way you want it to.

    -Phil
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 05:58
    actually the ti86 is in my oppinion "the most powerfull machine available" the reason for this statement is mostly for ease of use ,ease of programability,native asm and basic from 2 to 24 Mhz with mods and just its capability's this thing is like a commodore64 on P.C.P -I have used it for hacks,cracks,automation,communication,as a inbord intellegence like the supersnapshot cartrige for a c64 on a pc ,honnestly if they would build a standard z80 computer structured like ti86 and with speed competitive of 4Ghz. I think the rest of the computer industry would disapear these things are a breeze there are only a few drawbacks wich can be solved with mods -only96k memory,stock2khz,stock2color-
    you get speed by swaping a capacitor,
    greyscale with software,color by modification
    and a nifty 2gig+96k memory by implimenting a flashdrive
    what else can you ask ,its small fast easy to use .infact I noticed lately all the other ti calcs go down in price,the 86 is still $120 new same as the day it came out ,first the serial link wasnt avalible and now im seeing less and less of the 86 im thinking bigbrother< because it has this nifty command where it can freeze any cpu you connect it to in a state while you poke around and then free it and it never knows you where there ,this is funny but once i reformatted my c:drive and reinstalled windows xp on my computer I had left my calc connected after finnishing i picked up the calc to ballance checkbook and when it came on it was running windows desktop "all access" I played a few minuites and couldnt belive it so i disconnected to show someone and it crashed do to memory error the calc was useing pc ram ,and once you get a flash drive to work your good. in my oppinion any one who wants power in hand ti86 ,mods&reserch.
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 06:07
    -------------------------------------------------------------------
    
                       +--------
            /-- --- ---| To TI85
           <           |
            \-- --- ---|
             |   |   | +--------
             |   |   |
             |   |  Gnd
             |   |          +-------------------------------------------+
             |   |          |    +-------------------------------+      |
             |   |          |    |    +-------------------+      |      |
             |   |          |    |    |    +-------+      |      |      |
             |   |          |    |    |    |       |      |      |      |
             |   |         +++  +++  +++  +++      |      |      |      |   ->
             |   |    470  | |  | |  | |  | |    \---/  \---/  \---/  \---/
             |   |    Ohm  | |  | |  | |  | |     \ /    \ /    \ /    \ /  ->
      +5V    |   |         | |  | |  | |  | |    -----  -----  -----  -----
       |     |   |         +++  +++  +++  +++      |      |      |      |   ->
       |     |   |          |    |    |    |       |      |      |      |
       |     |   |          |    |    |    |       | LED0 | LED1 | LED2 | LED3
      +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+      |      |      |      |
      |16| |15| |14| |13| |12| |11| |10| | 9|      +------+------+------+
     +----------------------------------------+    |
     | Vdd  SDA  SCL  Int  P7   P6   P5   P4  |    |
     |                                        |    |
     +-+                                      |    |
     | |              PCF8574                 |    |
     +-+                                      |    |
     |                                        |    |
     | A0   A1   A2   P0   P1   P2   P3   Vss |    |
     +----------------------------------------+    |
      | 1| | 2| | 3| | 4| | 5| | 6| | 7| | 8|      |
      +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+      |
        |    |    |    |    |    |    |    |       |
        |    |    |    o |  o |  o |  o |  |       |
        |    |    |     -+   -+   -+   -+  |       |
        |    |    |    o |  o |  o |  o |  |       |
        |    |    |    | S0 | S1 | S2 | S3 |       |
        |    |    |    |    |    |    |    |       |
        +----+----+----+----+----+----+----+-------+
                                           |
                                     -    Gnd
    
    
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 06:17
    well there it is thanks phill for that.. anyhow if any genius out there can make this connect to the homework board on the output side of the above schematic useing I2c and as few pins as possible -i.e-"it would be cool to have a few outputs still open" I will be verry,verry greatfull ..and the parallax comunity will have a new way to field check/change there stamps too... by the way that simple code above is compleate all you need do is call either of the 2 main functions from your prog just include the snippet and your done and the link above to get the bs2 side of the I2c code....
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 06:28
    someone smack me....please...I read it all agian and it clicked lol .....that circuit is the interface im looking for useing 8pins .... dangit now I feel a fool....replace the switches on the input with 4 npn's correct? center leg to output of homework board and tap the led's to input 4pins connect common ground done right?
    Geeeeez I feel silly
    .. guess i had to rant....
Sign In or Register to comment.