The table itself is a sequence of retlw instructions, which put a value into W and return. (dt and related directives are just assembler shorthand for inserting many retlws.)
A first try at implementing a table lookup thus looks like this:…
I found a plastic vendor that sells acrylic tubes that are the perfect size to stack the tires (5" inner diameter and 5 1/4" outer diameter).
The only problem is that they only come in 6' long tubes. The 6' tube is ~$50 so I'm looking for 2 other groups who want to split up the 6' it'll be $15-20 for your 2' section of tube.
Heres the webpage for the plastic vendor…
Added by Timothy Ahong on January 26, 2011 at 10:00pm — No Comments
If there is a certain length of code coming before the DT (define table) directive, then characters/entries in the DT past a certain point will fail to return a value. Instead, upon reaching that character, the program will restart from the beginning.
Remember, or realize, that DT is actually a short form for a long list of retlw instructions. That means that having a DT holding a long string counts as many instructions.
This does NOT appear to be an issue of…Continue
In one of my define tables, if the table gets to a certain length I get a bug in my code. Just take one character away from that and everything is fine. I have found no significance in regard to... actually, I never counted it until now.
If there are 33 characters, my code bugs out. 32 is okay. Well, 32 is a very important number, but I have longer tables elsewhere. There is also no reason for this to bug out. It's simply absurd!
Each dt (define table) directive uses up a line for each character in your table/string. If you're not careful, your code could get long despite being short.
Here's how the define table directive works. Each character in your string is actually translated into a single retlw (return literal in W).
is translated into:retlw 'H'
Added by Ritchie Thai on January 26, 2011 at 12:00am — No Comments
If the path size of your MPLAB project's directory is too long, for example:
then a .hex file will not be created.
I am now using a workspace with the much shorter path:
Don't computers suck?
I rolled about 1000 tennis balls down an incline. It turns out that you need an angle greater than 7.7* to ensure a column of tennis balls will roll without error.
list p=16f877 ; list directive to define processor
#include <p16f877.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _HS_OSC & _WRT_ENABLE_ON & _CPD_OFF & _LVP_ON
ORG 0x0000 ;RESET vector must…
Added by PML on January 19, 2011 at 10:46pm — No Comments
Altium and Eagle are great softwares for PCB design. The softwares can be used to generate schematics and this information (all the parts and connections) can be automatically transferred to a PCB design layout where the parts can be manually arranged and then automatically routed (for relatively simple layouts). Altium also has a simulator and a 3D design layout mode that is helpful for complicated design. Eagle does not have these functions. However it is much less expensive than Altium.…Continue
Added by Thineshan Kathirchelvan (TA) on January 13, 2011 at 11:00pm — No Comments