At 12:28 PM 5/01/00 +0200, you wrote: >Hello everyone > >I have a problem with the programming of the PIC16C84. It have been a while >since i played whith a PIC but a late night for a while ended up in a simple >5x7 led matris. So I control the 4 first kolumnes with porta and the last >with portb,0. I soldered the diodes in the "wrong direction" to be able to >use the open kollector output. But It doesent matter I tought, I use the >leftover portb pin. But every time I try to play with the last kollumn >(portb,0), the leds freak out. Even the cleard PORTA register seems to >contain garbage. I have a sent a small examplecode on one test that never >worked.... > >Why doesen't it work!!! > > > >Ok this is what works... >;************************************' >movlw B'10000011' >clrf PORTA >movwf PORTB > >looping goto looping >;************************************* > >But when I want to load the value in ROW1 to PORTB It doesnt work very >well.... I tested this (and every other way.... eh..). > >;********************************** >movlw B'10000011' >movwf ROW1 >call KOL5 > >looping > > goto looping > >KOL5 > clrf PORTA > movf ROW1,PORTB ************ Should be: movf ROW,w ;get row data into w reg movwf PORTB ;send it to port from w reg ************ > return > > >;***************************** > > >Tnx for help /Andreas Magnusson _______________________________________________________________ Dave Duffy Audio Visual Devices AVD@uq.net.au Unit 8, 9-11 Trade Street, Cleveland, Queensland 4163 Australia Phone: +61 7 38210362 Facsimile: +61 7 38210281 _______________________________________________________________