![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | Thread Tools | Display Modes |
| | (permalink) |
| New Member | I have problem interfacing BS2px24 with LM629 for 2 weeks. 1) Does LM629 actually accepts TTL or must it be CMOS or other logic levels? Is there a logic level mismatch between BS2px24 and LM629? 2) Is the clock a must for proper operation? The BS2px24 does not have a pins which can output a clock. Does connecting an external clocks help? 3) I could not get a proper response after set low to PS, CS and RD. I used a direct connection from the stamp pins to the LM629 pins. Is it not possible to build something out from BS2px24 and LM629 together? Can someone shed some light on me? Thanks in advance |
| | |
| | (permalink) |
| Super Moderator | CMOS running off 5V and TTL are usually perfectly compatible, giving no problems. However, it's quite a complicated interface, and it's always difficult to know if your problems are hardware ones or software ones - particularly when you're trying to create a software version of the hardware bus the chip is designed for. The datasheet seems rather vague, but I would imagine the system clock is a requirement?. |
| | |
| | (permalink) |
| New Member | Thanks for the reply. I agree that it is a very complicated interface. That is because I am not so good at it. Is anyone able to explain whether LM629 is using logic level LVTTL, TTL or CMOS. From the datahseet, it looks like it is a TTL, however, the interfacing circuits to a HPC is shown connected to CMOS component. So, is LM629 really CMOS or TTL or LVTTL? If so, could there be a logic level mismatch between Basic Stamp and LM629? I did construct a clock ciruit with a 8Mhz crystals, two 22pf capacitor, two 100K, two Schmitt Inverter (using 74HC14) and connect the clock to the CLK input. It seems a little bit erratic as the program keeps on repeating after connected to a CLK. Doesn't seems to work properly. |
| | |
| | (permalink) | |
| Super Moderator | Quote:
| |
| | |
| | (permalink) |
| New Member | Source Code ======== ' {$STAMP BS2px} ' {$PBASIC 2.5} StatusByte VAR Byte Main: GOSUB Init ' Initialization GOSUB HW_RST ' Hardware Reset END Init: DEBUG "-INIT-------------------------", CR DEBUG "PIN# : 5432109876543210", CR 'Initialize the pins to high first since they are active high triggered DIRH = %00000000 ' databus P8-P15 is input OUTA = %1111 ' initialize control lines to high, P0=PS, P1=WR, P2=CS, P3=RD DIRA = %1111 ' make them outputs OUT4 = %1 ' set the RST pin high DIR4 = %1 ' make RST pin as output pin DEBUG "I/O : ", BIN16 INS, CR DEBUG "-\INIT-------------------------", CR Return HWRST: DO OUT4 = %0 'RST Low PAUSE 1 'min 8 clock cycles, assume 1ms is sufficient OUT4 = %1 'RST High GOSUB RDSTAT LOOP UNTIL (StatusByte = $C4 OR StatusByte = $84) RETURN RDSTAT: OUTA = %1010 'CS and PS Low OUTA = %0010 'RD low StatusByte = INH 'Read databus P8-P15 OUTA = %1010 'RD high OUTA = %1111 'CS and PS High DEBUG " Status: ", BIN8 StatusByte, " (", HEX2 StatusByte, ")", CR RETURN Ouput on Screen ========================= -INIT------------------------- PIN# : 5432109876543210 I/O : 0000000000011111 -\INIT------------------------- Status: 00100001 (21) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) Status: 00100000 (20) ... The data returned by LM629 seems to be fixed after reset is sent. As shown by the status, it is staying at hex20. Sometimes, it jump to maybe hex00 or hex30. I did not attached a clock to the CLK input pin of LM629 in this example though. I was thinking that the RST is an asychronous input and so might not need a clock as long as I pause long enough, correct me if I am wrong in this line of thought. If I were to connect a 8Mhz clock and power up, then the return status byte would be FF. |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Going from BASIC STAMP to PIC, which programmer/software? | RaG | Micro Controllers | 13 | 31st May 2006 06:01 AM |
| Basic Stamp & RC Car | pianoman | Micro Controllers | 4 | 19th February 2005 12:42 AM |
| PIC basic and Basic stamp | Cyborg | Micro Controllers | 5 | 21st April 2004 08:44 AM |
| Can a Basic Stamp support 2 serial ports? | Scruit | Electronic Projects Design/Ideas/Reviews | 13 | 15th August 2003 02:07 PM |
| LED marquee (controlled by BASIC Stamp 2) | cheesy9999 | Electronic Projects Design/Ideas/Reviews | 1 | 23rd April 2003 05:19 AM |