Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem Interfacing Basic Stamp BS2px24 with LM629

Status
Not open for further replies.

kwang

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
 
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?.
 
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.
 
kwang said:
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?

Does it run off 5V?, and your STAMP runs off 5V, so it makes no difference - they will be logic compatible - TTL or CMOS doesn't matter.
 
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.
 
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?

There is no mismatch. Although the LM629 in an NMOS chip, it sports TTL inputs and outputs. The BS2px sports a Ubicom SX48BD, which supports both TTL and CMOS levels.

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?

The LM629 absolutely requires a clock at pin 26, anywhere between 1-6MHz (or 8MHz if you have the fast version). You'll have to add one.

EDIT: I just noticed this is an ancient thread. Someone else brought it out of dormancy and I responded before I noticed the old dates... BAH!
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top