Electronics > Beginners

Assembly code Help! PIC16F57

<< < (20/32) > >>

Electrofinn:
You know it's funny you should mention the above because as I was trying think logically about how this might be working, I was thinking couldn't something be incorporated into those tables to do that job, but I just didn't know how or what or even if it would work. You see! There's hope for me yet! Lol

You made some major changes to the program loop and shuffled some stuff since then and made it look way neater, the attached asm is where I am at with code, can I not just remove the bitmask from "sequence1" and do the above modifications? only other things I have done is add my custom "pattern" and add tabs or removed tabs so it compiled without warnings. 

Electrofinn:
just thought i'd try above changes while I gave you time to reply and without bitmask in sequence1 the lights do strange things but with the bitmask its fine. not done enough testing to see if I broke something else but then I didn't want to just in case your face palming about what I was asking lol


i think i spoke to soon about the pattern2 not doing the full pattern because its just done it on what i thought was the good code...damn it. i was playing it all night aswell..strange. think i might try what you originally told me to do from original code.


getting really confused about what was what with all the edits.

KL27x:
New revision v21 attached

Well, I just looked at the code you attached, and it looks like all you did was to add that extra line to the odds table? You didn't add any bitmasks, at all, right?

So I did the changes in my last post to it and restored sequence1 to how it was, other than the part with new_byte.


--- Quote ---i think i spoke to soon about the pattern2 not doing the full pattern because its just done it on what i thought was the good code...damn it. i was playing it all night aswell..strange. think i might try what you originally told me to do from original code.
--- End quote ---

This is where figuring out how to mess with the code and having the device is helpful. If you learned how to find where these issues correlate with the code and how to manipulate the code, you could write a test code between the initialization and the main Loop to set the mode_byte to where it needs to be to jump to this identified problem area. And you could put in test values into the pertinent registers to reproduce the error, without having to play a slot machine for hours. :)

Any rate, since you did not add the bitmasking and simply lengthened odds table, this new version v21 may actually behave differently, maybe even more correctly if we're lucky. :)

Electrofinn:
Ok will test it. big headache this isn't it, I feel we getting closer though. because everything else seems ok. we will see.

Electrofinn:

--- Quote ---You didn't add any bitmasks, at all, right?
--- End quote ---


just that one in sequence1, which looking at v21 you have done away with.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod