really need help to get the dang code to display text smoothly if possible You might reconize some bits of code from your projects.
Code: Select all
*****************************************************************************
* Name : UNTITLED.BAS *
* Author : [select VIEW...EDITOR OPTIONS] *
* Notice : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
* : All Rights Reserved *
* Date : 11/27/2016 *
* Version : 1.0 *
* Notes :my code from brads need to insert const arrays *
* : *
*****************************************************************************
}
DEVICE = 18F24K20
CLOCK = 32
CONFIG MCLRE = OFF
CONFIG FOSC = intio67
INCLUDE "SetDigitalIO.bas" // Include this file when we compile so that we can use keywords like 'setalldigital'
INCLUDE "utils.bas"
INCLUDE "convert.bas" //xxxxx
INCLUDE "shift.bas"
DIM Scroll_Speed AS INTEGER
DIM x AS BYTE
DIM y AS BYTE
CONST Anodes_Data(9)AS BYTE = (%00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000,%00000000)
//CONST Cathodes_Data(9)AS BYTE = (%11111111,%11111111,%11100000,%11011011,%11011011,%11011011,%11100000,%11111111,%11111111)
{
CONST M_Data(8)AS BYTE =(%11111111,%11110000,%11101111,%11110111,%11101111,%11110000,%11111111,%11111111)
CONST E_Data(8)AS BYTE =(%11111111,%11111111,%11100000,%11101010,%11101110,%11111111,%11111111,%11111111)
CONST R_Data(8)AS BYTE =(%11111111,%11111111,%11110000,%11101111,%11101111,%11110111,%11111111,%11111111)
// CONST R_Data(8)AS BYTE =(%11111111,%11111111,%11100000,%11111011,%11111011,%11100000,%11111111,%11111111)
CONST Y_Data(8)AS BYTE =(%11111111,%11111111,%11111110,%11101101,%11110011,%11110111,%11101111,%11111111)
CONST C_Data(8)AS BYTE =(%11111111,%11111111,%11100001,%11011110,%11011110,%11011110,%11111111,%11111111)
CONST H_Data(8)AS BYTE =(%11111111,%11111111,%11100000,%11111011,%11111011,%11100000,%11111111,%11111111)
CONST I_Data(8)AS BYTE =(%11111111,%11111111,%11111111,%11100000,%11111111,%11111111,%11111111,%11111111)
CONST S_Data(8)AS BYTE =(%11111111,%11111111,%11110010,%11101010,%11101000,%11111111,%11111111,%11111111)
CONST A_Data(8)AS BYTE =(%11111111,%11111111,%11110000,%11101011,%11101011,%11110000,%11111111,%11111111)
CONST T_Data(8)AS BYTE =(%11111111,%11101111,%11101111,%11100000,%11101111,%11101111,%11111111,%11111111)
CONST space(8)AS BYTE = (%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111)
}
CONST Cathodes_Data(88)AS BYTE = (%11100001,%11011111,%11101111,%11011111,%11100001,%11111111,%11111111,%11000001, // M
%11010101,%11010101,%11011101,%11111111,%11111111,%11100001,%11011111,%11011111,
%11101111,%11111111,%11111111,%11100001,%11011111,%11011111,%11101111,%11111111,
%11111111,%11011111,%11101111,%11110001,%11101111,%11011111,%11111111,%11111111,
%11111111,%11111111,%11000001,%11011101,%11011101,%11111111,%11111111,%11000001,
%11111111,%11110111,%11110111,%11000001,%11111111,%11111111,%11100001,%11011111,// H r
%11011111,%11011111,%11101111,%11111111,%11111111,%11000001,%11111111,%11111111,// I
%11111111,%11000110,%11010110,%11010110,%11010000,%11111111,%11111111,%11011111,// s t
%11011111,%11011111,%11000001,%11011111,%11011111,%11111111,%11111111,%11100001,// t m
%11011111,%11101111,%11011111,%11000001,%11111111,%11111111,%11100001,%11011011,// m A
%11011011,%11100001,%11111111,%11111111,%11000101,%11010101,%11010001,%11111111)// A s
SetAllDigital // Make all Pins digital I/O's
TRISC = %00000000 // Make PORTD all outputs
TRISB = %00000000
OSCCON = %01100000
OSCTUNE.bits(6) = 1
PORTC.bits(3) = 1
TRISA = %00001111
TRISB = %00000000
TRISC = %00000100
ADCON0 = %00000001
ADCON1 = %00000000
ADCON2 = %11110011
Scroll_Speed = 200
y = 0
porta = %11111111
WHILE true
FOR x = 0 TO 7
portc = %00000000
portc = Anodes_Data(x + y) //CONST array data Portc C is Anodes
portb = Cathodes_Data(x) // Cathodes on PortB
DELAYMS(1)
portc = %00000000
DELAYUS(100)
NEXT
IF y +x <88 THEN // number of byte data in CONST arrays
DELAYMS(Scroll_Speed)
y = y + 1 // next A_Data byte data
ELSE
y = 0
END IF
WEND