HELP Wit 74LV8153N Shitft register , can't get the thing working
hi there , for some time now im playing around with a propeller ,
now im trying to get this 74lv8153 that I already have to work with the prop
im not so good with the prop and can't seem to find any good explination to get it to work
. my pins are conectend like
1- 5v
2-ground
3--ground
4-ground
5-datapin conecte to p.1
6-low
7-ground
8-ground
9
10-ground
11-ground
12-19 led's
20 5v
the program
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
RS = 1 {lcd control}
RW = 2 {lcd control}
E = 3 {lcd control}
DBLow = 4 {lcd control}
DBHigh = 7 {lcd control}
OBJ
SPI : "SPI_Spin"
PUB main |mount,RESET,ClockDelay,ClockState,Celsius
dira[8]:=1
SPI.start(50,8000)
repeat
SPI.SHIFTOUT(17, 18, SPI#MSBFIRST , 10, 0100011011) '' Request Configuration Write
SPI.SHIFTOUT(17, 17, SPI#MSBFIRST , 10, 0100010011) '' configure for ; CPU / Free-run mode
'' release the DS1620
waitcnt(cnt+clkfreq*10/1000) '' Pause for 10ms
!outa[8]
waitcnt(cnt + clkfreq)
PUB HIGH(Pin)
dira[Pin]~~
outa[Pin]~~
PUB LOW(Pin)
dira[Pin]~~
outa[Pin]~
i got a led at p8 just to see if ther's activity
question , i don't know if there is shomething wrong with the code so the prop sends the wrong signal , ORRRRR
the shift register is not wired properly
i wired the adress lines to ground to get 000 . that good right ?
hope to get some rely so I can get this working
igor
now im trying to get this 74lv8153 that I already have to work with the prop
im not so good with the prop and can't seem to find any good explination to get it to work
. my pins are conectend like
1- 5v
2-ground
3--ground
4-ground
5-datapin conecte to p.1
6-low
7-ground
8-ground
9
10-ground
11-ground
12-19 led's
20 5v
the program
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
RS = 1 {lcd control}
RW = 2 {lcd control}
E = 3 {lcd control}
DBLow = 4 {lcd control}
DBHigh = 7 {lcd control}
OBJ
SPI : "SPI_Spin"
PUB main |mount,RESET,ClockDelay,ClockState,Celsius
dira[8]:=1
SPI.start(50,8000)
repeat
SPI.SHIFTOUT(17, 18, SPI#MSBFIRST , 10, 0100011011) '' Request Configuration Write
SPI.SHIFTOUT(17, 17, SPI#MSBFIRST , 10, 0100010011) '' configure for ; CPU / Free-run mode
'' release the DS1620
waitcnt(cnt+clkfreq*10/1000) '' Pause for 10ms
!outa[8]
waitcnt(cnt + clkfreq)
PUB HIGH(Pin)
dira[Pin]~~
outa[Pin]~~
PUB LOW(Pin)
dira[Pin]~~
outa[Pin]~
i got a led at p8 just to see if ther's activity
question , i don't know if there is shomething wrong with the code so the prop sends the wrong signal , ORRRRR
the shift register is not wired properly
i wired the adress lines to ground to get 000 . that good right ?
hope to get some rely so I can get this working
igor
Comments
01 start bit
000 adress
0101 data
1 stop
so 0100001011 msb fist
what do you sugest i use then
SPI : "FullDuplexserial"
PUB main
dira[8]:=1
SPI.start(31,30,2,9600)
repeat
SPI.bin(0100011011,10)
SPI.bin(0100011011,10)
waitcnt(cnt+clkfreq*10/1000) '' Pause for 10ms
!outa[8]
waitcnt(cnt + clkfreq)
getting close ????
is the IC wiring good if you know the ic ?
A few tips:
The name of the object is also a bit misleading, it has nothing to do with SPI and although we are not name police we must remember that the whole reason for naming anything is to make it identifiable. Formating the code correctly for posting isn't a bad idea either. Also the device will run up to a maximum of 24000 baud and remember that you don't have to lock it to a standard baud rate either. This may be handy if you do not want to dedicate a cog to full duplex since all you need is some simple Spin code generating a serial bit stream without the need for any input either.
thnx
i got it working with a simpel dira outa code
eureka moment