Post your code.... The pages in the mid sized pic's are 255 bytes so if your table crosses from one page to another the table may not be addressed in its entirety.... If you have more than 1 table ( under 255 bytes each ) you can set their perspective start positions, so they don't cross a boundary using org..
org 0x100 ; start of second page
table1: etc....
org 0x200 ; start of third page
table2: etc....
Not sure just how to do this but here is part of my code. It carries on the same with the code showing each minute starting at 12:00 to 1:50 . Anything past 1:50 and I start to get the warning message. As you can see I am not using tables. Not sure as to where I insert the org 0x100. Hope this helps. Thanks again or your help
So not Tables????
that come up when mplab compiles the code.
goto's and calls are 511 byte jumps.... There is nothing wrong here, other than your code is too widespread..
Make subroutines and reuse code... I think the messages are not "errors" but "warnings"... This always happens as the assembler doesn't see the bank selections...... You can actually turn these warnings off..
Yes Ian you are correct. These are warnings when mplab compiles the code. When the warnings come up my time display starts to screw up. Would removing these warnings help, and if so how do I turn them off? I am wondering how I can reuse the code since every time display is different. My clock works like this.On the 8x8 matrix the left column and part of the top row keeps track of the 12 hours, and the right column keeps track of the 10s of minutes, while the minute is displayed in the center. Thanks again for your input
I think that it is the program memory pages that the OP is having trouble with, rather than the data memory banks.No!!! Take heed of the warnings... Go through each one and make sure the correct bank is selected at each warning..
I always use the "banksel" directive to ensure the correct bank is selected... make sure you're always back in bank 0 when you are done..
Looking for a little help while I am experimenting with Nigel's 8x8 matrix experimental board using assembly language. I am trying to make a simple unique clock. So far I have the timing sequence set up properly and can read the time up to 2hrs but as the program gets larger mplab comes up with this message when trying to compile ,Crossing Page Poundary-Ensure Page Bits Are Set even though it says build succeeded. Since I am a beginner I do not know what to do from here. Any help that I may get will be greatly appreciated . Thanks
That can lead to wild speculation......And so on.
That can lead to wild speculation...
You have a 17 word code block for every minute of the day. At least, that's how it appears.
Given that there are 720 minutes in a 12 hour period, or if this is a 24 hour clock, then 1440 minutes, multiply that by the 17 words in each code block and you get 12240 (or 24480) words of code. I haven't checked the specs of a 16F877A, but I suspect that it's not going to fit. Hence, my earlier comment about using a loop.
You are correct Bob. The 16f877A chip only has 8192 single word instructions. The clock is only for a twelve hour period. Not just sure how I would implement a loop in my code. Thanks for your input.
Check out tutorial 13.4, which uses a large table for generating a font, and another large table to hold a string to display.
This tutorial contains all you need to generate a clock (or any other text/numeric) display.
ASCII_Table ;perform read from long table
movlw High(Table)
addwf offsetH, W
movwf PCLATH
movlw Low(Table)
addwf offsetL, w
btfsc STATUS , C
incf PCLATH, f
MOVWF PCL
You need to start looking at this another way...
How many bitmaps have you got to display...ie.. The 8x8 matrix needs to show what??? Then you need to store each one in a table... Then have a small routine that collects the 8 sequences and puts them where they need to go..
You can get access to the 170 sets of 8 by using large table code ( In the same place as you got the rest of it )
Note the high and low table parameters..
Code:ASCII_Table ;perform read from long table movlw High(Table) addwf offsetH, W movwf PCLATH movlw Low(Table) addwf offsetL, w btfsc STATUS , C incf PCLATH, f MOVWF PCL
Using a table and a simple routine will cut your code down to a manageable size..
you said:Ian, I have tried nigel's code (tutorial 13_3) using the ASCII table above. But since I have 720 sets of 8 code it seems that the 16f877A can not handle that much . Like I say, the clock works well up to 1 hr and 35 minutes then reverts back to start all over again. Getting frustrated. Thanks again for your patience and input.
Ian, I have tried nigel's code (tutorial 13_3) using the ASCII table above. But since I have 720 sets of 8 code it seems that the 16f877A can not handle that much .
Let me help you.... If you show me a sample of your output ie... "12:00".. How is it being displayed?? How many 8x8 LED panels are you using???
I would imagine there will be many duplications in the data.... There are also many ways to optimize...
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?