scrolling messages vertical up from bottom to top right
Project name:
' vertical up from centre to top right
' ' ' * Description:
' This code demonstrates scrolling messages vertical up from bottom to top right
' on 8x32 dor matrix, 2x74hc154.
' * Test configuration:
' MCU: PIC16F628A
'' Oscillator: HS, 20.000 MHz
' config: PWRITE_ON, WDT_OFF, LVP_OFF, HS
' Ext. Modules: None
' SW: mikroBasic v7.2
' date: March 18th, 2010
' * NOTES:
program vertical_up_centre_to_top_right
const supra as byte[30] = (
$00, $46, $49, $49, $49, $31,' // S
$00, $3F, $40, $40, $40, $3F,' // U
$00, $7F, $09, $09, $09, $06,' // P
$00, $7F, $09, $19, $29, $46,' // R
$00, $7E, $11, $11, $11, $7E)' // A
dim i, x as byte
dim temp_array as byte[32]
dim shift, a, value, column as integer
main:
'Set int Port operations
trisb = 0
trisa = 0
portb = 0
porta = 0
cmcon = 7
i = 0
a = 0
x = 0
column = 0
shift = 0
value = 0
start:
' Calculate the number of columns in the text
column = 30
'Temporary array reset
for i = 0 to 31
temp_array = 0 'Array elements start out 0
next i
while true
'Shift operations
for shift = 0 to column 'prolong spaces to repeat again
'32 columns of text divided into pieces
for i = 0 to 31
value = i - shift
if(value > 0) then
temp_array = 0 ' text input
end if
if(value >= 0) and (value <= column - 1) then
temp_array = supra[value]
end if
if(value > column) then
temp_array = 0
end if
next i
'Scanning process
for a = 0 to 35 'control scrolling speeds...highuer number is slowest and lowest number is fastest
for x = 0 to 31 'Temporary array view
ClearBit(PORTA, i) 'Clear the Ghost locations ready for starting
portb.i = 0
portb = temp_array[x] >> shift 'send data to PortB
porta = x 'select the corresponding column
Next x
nop
nop
' delay_us(1000)
next a
next shift
wend
goto start
end.
youtube:
http://www.youtube.com/watch?v=XLCAeZyk6Uw
Scrolling Text
Re: Scrolling Text
hye supra..
im new in LED programming but i want to learn about it for my project..
base on ur project, can we use 5x30 dot mtrix that using PIC16F628A interface from keybord?..
i mean we enter our word from keyboard..
can u givev me example for code source and circuit diagram using keyboard..
coz i try to goole it, but nothing..cz all using different PIC..
plz help me..
i really need it..
im new in LED programming but i want to learn about it for my project..
base on ur project, can we use 5x30 dot mtrix that using PIC16F628A interface from keybord?..
i mean we enter our word from keyboard..
can u givev me example for code source and circuit diagram using keyboard..
coz i try to goole it, but nothing..cz all using different PIC..
plz help me..
i really need it..
Re: Scrolling Text
Yes! U can used 5x30 interface with keyboard. It can be found in help files. Actually I haven't tried with keyboard. Because i'm moving into mikroBasic pro and mikroBasicdsPIC30 pro.aeddy wrote:hye supra..
im new in LED programming but i want to learn about it for my project..
base on ur project, can we use 5x30 dot mtrix that using PIC16F628A interface from keybord?..
i mean we enter our word from keyboard..
can u givev me example for code source and circuit diagram using keyboard..
coz i try to goole it, but nothing..cz all using different PIC..
plz help me..
i really need it..
http://www.uelectronics.info/pic-interface-at-keyboard
here is source code for keyboard:
Note it is only for pcBAsic,. But u may have to modified.
http://users.picbasic.org/Howto/PC_keybrd/KYBD_2.bas
U may gave to translates from C to Basic:
http://www.ccsinfo.com/forum/viewtopic.php?t=27544
wireless keyboard tutorial:
http://instruct1.cit.cornell.edu/course ... elessKybd/
Re: Scrolling Text
thanks supra..
i will try..
later on i will post my project progress to share anybody..huhu..
but how i want to change your coding into my project..
now i using 2mhz and 5x7 led...
base on your coding is 20mhz and 8x8..
can you give me example..
i will try..
later on i will post my project progress to share anybody..huhu..
but how i want to change your coding into my project..
now i using 2mhz and 5x7 led...
base on your coding is 20mhz and 8x8..
can you give me example..
Re: Scrolling Text
aeddy wrote:thanks supra..
i will try..
later on i will post my project progress to share anybody..huhu..
but how i want to change your coding into my project..
now i using 2mhz and 5x7 led...
base on your coding is 20mhz and 8x8..
can you give me example..
Here is schematic:
download pdf files:
http://www.electronic-engineering.ch/m ... d_V2xx.pdf
Re: Scrolling Text
U can modified urself to suit ur codes.aeddy wrote:thanks supra..
i will try..
later on i will post my project progress to share anybody..huhu..
but how i want to change your coding into my project..
now i using 2mhz and 5x7 led...
base on your coding is 20mhz and 8x8..
can you give me example..
The chip i used is 16F628A i/p20 Can used from 8 to 20Mhz
If u r using 2mhz. U must change speed.
.
.
.
for a = 0 to 35 'control scrolling speeds...higher number is slowest and lowest number is fastest I used 20Mhz
.
.
.
I do not have 2mhz osc with me. All i have is 4, 8, 10, 12, 20Mhz
Re: Scrolling Text
so if i change to 4mhz with 5x7 led..
so what i need to change the coding?..
btw, i try to build ur coding using micro c..
it out many error..
so what i need to change the coding?..
btw, i try to build ur coding using micro c..
it out many error..
Re: Scrolling Text
The 4mhz is good for u. But 2 mhz seemed slowly for sending to output.aeddy wrote:so if i change to 4mhz with 5x7 led..
so what i need to change the coding?..
btw, i try to build ur coding using micro c..
it out many error..
email me with ur code.
Re: Scrolling Text
hello supra..
i try use ur coding..
but i got error..
is there any command that i miss?..
can u gv me a complate of ur coding?
im beginner in mirco c..
i try use ur coding..
but i got error..
is there any command that i miss?..
can u gv me a complate of ur coding?
im beginner in mirco c..
Re: Scrolling Text
I merely started with mikroBasic.chocolate wrote:hello supra..
i try use ur coding..
but i got error..
is there any command that i miss?..
can u gv me a complate of ur coding?
im beginner in mirco c..
This code was written completely in mikroBasic but never written in mikroC
What the error message?
This is the only codes that is completed everything that i posted on this forum.
There r no commands missing in mikroBasic, but missing must be found in mikroC.
There must be syntax error:
From basic to C:
for while true ===> for(;;)
dim temp_array as byte[32] ==> unsigned char temp_array[32] ;
dim shift, a, value, column as integer ==> int shift, a, value, column;
dim i as byte ==> unsigned char i = 0 ;
i = 0
If not check portA:
porta = x ==> portA = PORTA <<1;
Re: Scrolling Text
oh..i c..
sory..
btw, did u use transisitor for ur circuit?
can i know what type transistor that u use?
sory..
btw, did u use transisitor for ur circuit?
can i know what type transistor that u use?
Re: Scrolling Text
.chocolate wrote:oh..i c..
sory..
btw, did u use transisitor for ur circuit?
can i know what type transistor that u use?
I don't used transistors. U don't needed this. Because of shift register can limited to 20 mA output.
Or u can used network resistors or uln2003. This will helped reducing components
If u want to used transistors u can used general transistors (npn or pnp), such 2n222, 2n3906(pnp), etc. The output is taking from emitter(Common Emitter), because of constant current and it is digital not analog
If u r not familiar or u r not electronic technician engineering or technology
http://www.kpsec.freeuk.com/trancirc.htm
or search google transistor tutorial or go to library.
Re: Scrolling Text
Thank you.abdallah205 wrote:excellent work
Just to let u know that i'm moving into arm11
salaam
Supra