Author Topic: Assembly code Help! PIC16F57  (Read 16030 times)

0 Members and 2 Guests are viewing this topic.

Offline ElectrofinnTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: gb
Re: Assembly code Help! PIC16F57
« Reply #150 on: October 09, 2018, 10:57:46 pm »
So far so good, I hope so because following our nomenclature I would so love to rename this file something like Fruit Machine_v23_Final lol


Will keep you posted.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4108
  • Country: us
Re: Assembly code Help! PIC16F57
« Reply #151 on: October 09, 2018, 11:02:13 pm »
I've just saved it as v22 after your last post. The prior wasn't done, yet, is why it is still "clip" (board).

I have had to wrap from 99 back to zero on a project, before.* No need to get crazy with too many revs. :)

*Why not keep going beyond 100? On device with EEPROM, I usually put the revision number into one byte of EEPROM.
« Last Edit: October 09, 2018, 11:04:21 pm by KL27x »
 

Offline ElectrofinnTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: gb
Re: Assembly code Help! PIC16F57
« Reply #152 on: October 09, 2018, 11:06:10 pm »
Quote
I have had to wrap from 99 back to zero on a project


Wow, Jeeze! lets hope we don't repeat that history lol

Quote
*Why not keep going beyond 100? On device with EEPROM, I usually put the revision number into one byte of EEPROM

oh i see.
 
« Last Edit: October 09, 2018, 11:08:18 pm by Electrofinn »
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4108
  • Country: us
Re: Assembly code Help! PIC16F57
« Reply #153 on: October 09, 2018, 11:16:02 pm »
For anyone else learning assembly:

I try to make all the major code changes in a revision easy to find, by using indented labels and/or putting instructions/directives in column 1 in order to generate a warning. Save that revision. Then on the clipboard version when I want to forget about them, I can unindent those labels and tab the instructions to clear all those warnings to have a clean state. If I need to see v22 changes, I can load the saved .asm file and those warnings are there in posterity, forever. Unlike using the (cumbersome) bookmark feature in the IDE.
 
The following users thanked this post: Electrofinn

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4108
  • Country: us
Re: Assembly code Help! PIC16F57
« Reply #154 on: October 09, 2018, 11:33:03 pm »
Here is my code history .txt. You can put this into your project folder, then right click on "other" folder in the project view window and add this file. You can see the miles of stuff I went through to figure out the few lines of code to change/add.

Pin Configuration can be added to the "header" folder in the same way.
Typically, I'm going to put each bank of memory on its own .inc file, too, added to the header folder.
And error levels, ditto.

Now to see those things, it's just a click, and you have that info side-by-side your current place in the code. Rather than scrolling through 5 miles of code AND losing your place in the code AND forgetting what you looked up by the time you have the code on screen, again.

But note, if you wanted these .inc files to be included, you would have to include them in the main .asm file. Like this:

#include Pin Configuration.inc
#include Error_Level.inc

You can do this up at the top of the file with the "#include list_16F57.inc," or if adding other .asm files, which you can add to "other" folder, you may put the #include anywhere you want that code to go.

None of the defines in the Pin Configuration are utilized, but it's nice to be able to click on it to quickly pull it up for reference. So as it is right now, there's no reason to include it unless you starting using these defined names in the code. It's also often handy to have a spare whiteboard.asm where you right/modify new bits of code, so you can scroll through the main .asm to reference while writing it.

**edit... apparently .inc files can't be uploaded. Will change Pin Configuration to .txt and you would have to change it back to .inc before adding it to "header" folder.
« Last Edit: October 10, 2018, 12:16:55 am by KL27x »
 
The following users thanked this post: Electrofinn

Offline ElectrofinnTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: gb
Re: Assembly code Help! PIC16F57
« Reply #155 on: October 10, 2018, 12:34:32 am »
Great so far, one little minor and I mean really minor is that the "pattern" sometimes but rarely begins after a shorter delay than 2 seconds, maybe 1/2 a second maybe less. But I wouldn't care if this was left alone. Great info above BTW.
« Last Edit: October 10, 2018, 12:43:37 am by Electrofinn »
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4108
  • Country: us
Re: Assembly code Help! PIC16F57
« Reply #156 on: October 10, 2018, 12:55:00 am »
Quote
But I wouldn't care if this was left alone.
Neither would I. :) 
 

Offline ElectrofinnTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: gb
Re: Assembly code Help! PIC16F57
« Reply #157 on: October 10, 2018, 01:03:34 am »
Lol 😂
 

Offline ElectrofinnTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: gb
Re: Assembly code Help! PIC16F57
« Reply #158 on: October 10, 2018, 04:33:14 pm »
Well, I think you well and truly nailed this! It's working beautifully, thankyou so much for everything you have done. Was looking over the code and it looks almost unrecognizable from the original, it's incredible.

Again thank you so much.

KL27x I have sent you a PM       
« Last Edit: October 10, 2018, 05:17:19 pm by Electrofinn »
 
The following users thanked this post: KL27x


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf