![]() | ![]() | ![]() |
| | |||||||
| Electronic Books Recommended books of interest to any electronic enthusiasts. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) | ||
| Quote:
Quote:
I can only imagine such practice comes from people whom either don't know better, or are used to non-MicroChip assemblers?. | |||
| |
| | (permalink) |
| Thanks Nigel, So, when I use MPLAB IDE and create a project, the include file associated with the PIC I select already contains this data?? Actually the author of the book I purchased to "re-learn" teaches the reader to always include this in the header of all source code written and the book is based on the 16F84 chip. So he certainly is accustomed to the Microchip product line as he also shows how to use MPLAB IDE v6.30
__________________ We learn by example and by direct experience because there are real limits to the adequacy of verbal instruction. Malcolm Gladwell www.olson-engineering.com Last edited by ex-navy; 28th April 2008 at 12:07 PM. | |
| |
| | (permalink) | |
| Quote:
Look in this folder on your hard drive. C:\Program Files\Microchip\MPASM Suite\Template\Code These are templates produced by microchip, I would suggest you use the one related to your PIC when writing programs. Interesting what you said about 'that' micro book , I too bought it some years ago, its quite useless.!!! EDITED: The extension of the abbreviation EQU, is not EQUals, its EQUATES
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 28th April 2008 at 12:22 PM. | ||
| |
| | (permalink) |
| Bill, As I can see from the books that I have purchased, (in excess of $200) and knowing and teaching electronics in the Navy, there is a lack of reference to the tools that are needed to start and how to use these tools. For instance: I bought and built a Junebug, not a problem to follow your schematics and love your Google sketchups, by the way; Then I needed to discover how to code using the MPLAB IDE. This was a huge learning curve, as the MPLAB manual is good, however; knowing what programmer/debug tool to select, do I need linker files or not, how to build, how to run, where is a list of errors, etc etc. Establish base lines first. List what tools will be used in this particular project: Example: MPLAB IDE v8.0 Junebug USB cable Notepad or similiar I find that there is alot of expertise here, alot of pros and cons in using Assembly, Swordfish, C18, blah blah blah, but a newbie can be "steered" all over the place by members using other IDE's, programmers, languages, hardware, etc. Build it and I will buy it.
__________________ We learn by example and by direct experience because there are real limits to the adequacy of verbal instruction. Malcolm Gladwell www.olson-engineering.com | |
| |
| | (permalink) |
| Thanks Eric, Yes, I discovered that it is Equates. I did not understand at first. Can someone also explain if I am correct in assuming the following: Consider an LED with its cathode to ground. It's anode is connected via a current limiting resistor on pin RA0 If I want to illuminate the LED, using assembly, I first establish PORTA as outputs by writing 8 zeroes to TRISA? The 8 pins on PORTA correspond to pins RA7:RA0 movlw b'00000000' movwf TRISA I then set bit PORTA, RA0 ;illuminate LED BSF PORTA,RA0
__________________ We learn by example and by direct experience because there are real limits to the adequacy of verbal instruction. Malcolm Gladwell www.olson-engineering.com | |
| |
| | (permalink) | |
| Quote:
I would suggest that you look thru Nigels tutorials, ref LED's and other topics. The web link appears under his name on his posts... You can cut/paste his code into your learning curve.!
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| Whilst you shouldn't include a list of equates for the special function registers, you should equate other things. This makes the code much easier to read. Code: BufferLength equ .64 Cr equ .13 Esc equ .27 BaudRate equ .19200 Mike. | |
| |
| | (permalink) |
| Yes, I just read Nigels first 5 tutorials and now see why EQU statements are important LEDPORT EQU PORTB LEDTRIS EQU TRISB So, the #define statement is the same as the EQU?? I also see by your example that you use .64 which I assume means decimal 64. In Nigels tutorials he uses d'250' So one could use movlf .250?? One more question that has me stumped as I don't see it often in code is the STATUS RPO Setting the RPO bit of the Status Register selects BANK 0. By meaning BANK 0, does that mean BANK 0 is a memory page?? BANK 1 is the other memory page (allocation page??) I don't see this in documentation for the 18F1320, so is it used anymore in the newer PICs???
__________________ We learn by example and by direct experience because there are real limits to the adequacy of verbal instruction. Malcolm Gladwell www.olson-engineering.com Last edited by ex-navy; 28th April 2008 at 02:45 PM. | |
| |
| | (permalink) | |
| Quote:
Code: #define LED1 PORTB,3
bsf LED1
;is the same as
bsf PORTB,3 Edit, you added a bit. Mike. Last edited by Pommie; 28th April 2008 at 02:54 PM. | ||
| |
| | (permalink) | |
| Quote:
__________________ --- The days of the digital watch are numbered. --- | ||
| |
| | (permalink) |
| Yes, my bad. It would have been better to say "This bank switching was replaced on the 18 series chips.", meaning the RP0 type switching. Mike. | |
| |
| | (permalink) |
| As the book will take ages to create I was thinking of doing something in sections like a newsletter. Something like the old TPUG (Toronto PET Users Group) newsletter. http://www.tpug.ca/archive/archive.html Peharps starting with about 4 pages and hopefully will grow over time. JPUG (Junebug PIC Users Group) | |
| |
| | (permalink) |
| hi Bill, IMO, this parallel approach is a much better idea. In this way contributors could submit to 'you' articles of say, upto 6 pages on their specialised subject for publication on the forum. This should get the information available for use by readers far quicker than waiting for a 'book' to be released,,, which will most likely be out of date by the time it is completed. The writers could also update/upgrade their sections in the future, as required. We are always proposing to students that the 'modular' way of programming is the way to go, so why not go modular with the book.? Regards
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 30th April 2008 at 07:43 AM. | |
| |
| | (permalink) |
| I agree, every time I get a "new" PIC book it's either full of errors or out of date. A newsletter can also be presented in any order. Code / hardware snippets, contributions, ideas. Like the fourms here but collected and saved in a PDF format. I'll post them here and on my site so they can be found with ease. Now all I need is to gather some articles and there are plenty here. | |
| |
| | (permalink) |
| Bill, I think that's an excellent idea. A newsletter would provide a modular approach, much like lessons. Start off with newbie discussions and work your way up. It's like an interactive book with articles submitted by other users. I tend be the type that would like to print a pdf lesson for future reference instead of trying to find it in my bookmarks.
__________________ We learn by example and by direct experience because there are real limits to the adequacy of verbal instruction. Malcolm Gladwell www.olson-engineering.com | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Electronic Systems (General Electronics) | ThermalRunaway | Electronic Books | 39 | 4th October 2008 11:56 AM |
| Visual Basic for Electronics Engineering Applications | ThermalRunaway | Electronic Books | 22 | 27th August 2008 08:40 PM |
| High ADC sampling rate PIC, 18F needed? | bananasiong | Micro Controllers | 24 | 28th October 2007 01:13 PM |
| Need some help with a code provided by ATMEL | ikalogic | Micro Controllers | 1 | 23rd January 2007 03:46 PM |
| Recomended book for the Electronics "newb" | windozeuser | General Electronics Chat | 1 | 21st July 2005 08:04 PM |