PDA

View Full Version : Interfaceing another PIC? Replacing a existing Digital chip with My PIC



wdmagic
- 18th January 2013, 15:28
I have a circuit board that sends a data stream to a chip, that chip converts the serial stream to LED's
the chip is a A6276ELW see pic of display board. I want to replace this board with a 18F4550 chip that uses a LCD to display the data instead of LED's

http://www.datasheetcatalog.org/datasheet/allegromicrosystems/6276.pdf

First is this possible using a 4550 chip to get the data?
and am I going to need to set up anything on the chip for a specific freq. or anything based on the existing display board?
I am hoping i can just grab the data and not worry with anything else.

6821

Chirpy
- 18th January 2013, 16:21
all it is is a 16 bit shift register, so I dont see why it would be that hard to just emulate a shift register with the 18f4550, but I'd honestly go for something cheaper rather than wasting a chip that has built in usb on an application that doesnt use usb.

also, you'd need to limit the voltages to the PIC chip due to the old chip running on 7v and pic chip only taking 5v max.

wdmagic
- 18th January 2013, 16:28
ive got a surplus of 4550's is why i was using them. why would i emulate a shift register? if my pic is just receiving data and processing it.
note that my pic will be replacing this whole board, so the serial data coming out of the main unit to this board should be a 5v data i would think.
also the use of the 4550 allows me to use the chip for other things too not just for a display. i also may want to interface a pc to this to get the data too so the usb will come in handy there.

HenrikOlsson
- 18th January 2013, 16:41
Where does it say that the old chip is running on 7V?

You can do it with a PIC (though a 4550 for this seems overkill as have been said) but you need to know what the clock frequency and "data update rate" of the communications are. Not for setting anything up but in order to decide HOW to do it with the PIC.

If the clock frequency is low enough you may be able to grab the data by using the latch signal as a sync and then poll the clock and data signals in a loop. If the clock frequency is too high for that you should be able to set the MSSP module up as a SPI slave, probably have to think a bit about how to do the sync. It would help with a scope or logic analyzer shot of a "frame" being transfered from the main board to the display board.

What type of LCD are you talking about, a "standard" HD44780 based display or something else?

/Henrik.

EDIT: You would emulate a shift register because that's what's inside the LED driver chip on your original board.

wdmagic
- 18th January 2013, 17:34
ok thanks henrik., I dont have the clock freq or a logic analyzer, i do have a 20mhz scope. i dont even have a freq counter. may be in luck though, near the microprocessor on the main unit, and only a few milimeters from the cables is a 16mhz chip, so i will assume thats what is driving the microprocessor. its a intel n87c51fb1.

heres a pic of part of the main system board

6823

Chirpy
- 18th January 2013, 19:48
in the datasheet he had posted up above, the A6276ELW's operating voltage shows 7v. it could probably be 5v, but if the board was being replaced by the pic chip, the voltage of the original board would still be sending out the 7v Id think to the board he's replacing, so there would be the need for level translation imo.

wdmagic
- 18th January 2013, 20:23
chirpy, thats a maximum rating, in the notes on the side it states its using a 5volt logic supply.
its like most PIC's have a 5.5v max, but we never run them at that. I can only assume they designed it that way to be able to use 6volt external/isolated supplys , the internal componets probobly regulate the voltage a bit or have isolation parts for the interfacing.

NOTE: if you look on page 4 it says normal range is 5 volts and max is 5.5, im not sure why they say 7 on page 1 as a max.

HenrikOlsson
- 18th January 2013, 21:18
Yes, the 16MHz x-tal is liekly driving the main processor but what I mean with clock frequency in this context is the frequency of the clock that drives that communication between the main board and the display board. If you look at the datasheet for the LED driver chip you'll see that it's basically a shift register. It shifts data in on pin 2 one bit at a time each time there's a rising edge on pin 3. What you need to know is the frequency of that clock signal and the frequency of the latch signal - which can be thought of as the "frame rate" of the display.

Put a scope probe on the latch signal (pin 4 on the A6276) and another probe on the Clock signal (pin 3 on the A6276) and see if you can get a stable trace on the scope (I'm guessing that it's an anlog scope and not a digital sampling scope). That will tell you how often the display is refreshed and the frequency of the clock signal.

It's possible that the display is only refreshed when something actually changes so you may need to push some buttons or whatever on that main board - what ever that is.

/Henrik.

wdmagic
- 18th January 2013, 23:21
ok thanks I'll try that, the 2 buttons are just on and off.