Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 26th February 2007, 04:17 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default Started to use the 18F series comments.

Well some of you may know I'm working on a motorized robot platform called Mongoose and for its processor I've chosen the PIC 18F2525 (a 16F886 can also be used). See the thread in Robotics for info & pictures.

I chose the 18F2525 because
  • Two PWM outputs (one for each motor)
  • 24K Program space (48K bytes)
  • 1K EEPROM (might add an I2C EEPROM to the board...)
  • Free C18 compiler (student edition)
  • Works with the Inchworm ICD2
Now I've began writing small programs for it and let me share my experince so far.

I like it, I would even go so far to say if you've used the 16 series PICs the 18 series will seem easy.

For starters you don't need STATUS, RP0 nearly as much (not used it yet)
  • very little bank switching (unlike the 16 series)
  • you can get to the CONFIG memory
  • much larger linear address space (RAM included)
  • a LATx (latch) command makes using the ports better
  • all support the debug mode
  • 72 instructions including a movff (move FSR to FSR directly)
  • designed for C (but assembly is just fine)
  • very compact code possible
What may be harder...
Lots of CONFIG settings can be a little daunting at first but are manageable.
Appears you set CONFIG differently than the 16 series
ie CONFIG1H = 0x40 (simpler actually)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 26th February 2007, 05:13 PM   (permalink)
Experienced Member
 
picasm will become famous soon enough
Default

Quote:
Originally Posted by blueroomelectronics
Lots of CONFIG settings can be a little daunting at first but are manageable.
Appears you set CONFIG differently than the 16 series
ie CONFIG1H = 0x40 (simpler actually)
When I started using 18F, I was slightly annoyed by the number of config settings. However the supplied chip specific INC files actually include the latest format of config settings (they are commented out).
I found it easier to copy them from there into a separate INC file for each project and change any settings there.
picasm is offline   Reply With Quote
Old 5th March 2007, 07:56 PM   (permalink)
New Member
tnay is on a distinguished road
Default

Hi,

The 18F2525 comes in 28/PDIP 300mil. What does the 300mil means? I found a 40 pins version, 48kWords, great for user who are familiar with the 16F877 and need the extra memory.
tnay is offline   Reply With Quote
Old 6th March 2007, 12:48 AM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Quote:
Originally Posted by tnay
Hi,

The 18F2525 comes in 28/PDIP 300mil. What does the 300mil means? I found a 40 pins version, 48kWords, great for user who are familiar with the 16F877 and need the extra memory.
300mil means it's a skinny dip. (0.3" wide like most small DIP ICs)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 6th March 2007, 02:58 PM   (permalink)
Experienced Member
picbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of light
Default

Once you go 18F you'll be reluctant to go back to the 16F series.

The only gotchas I've found so far are the read-write-modify ones and I had one design that used to glitch at random intervals. Turned out that if it had an interrupt iwhen running a particular line of code it wouldn't execute the next instruction after the return.

This was cured after a week of debugging by using the "RETURN FAST" command.
picbits is offline   Reply With Quote
Old 6th March 2007, 04:38 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

read-write-modify has been fixed if you use the LAT command I thought.

I'm not that familiar with its extended commands but it is in fact easier to use than 16 series chips.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 6th March 2007, 04:39 PM   (permalink)
New Member
tnay is on a distinguished road
Default

I surely appreciate a larger memory for my case as I need to do a lot of real time calculation for my project. Anyway, I ordered a sample of both today. I'm very new to PIC and I have only worked on 16F877A using CCS C compiler. I wonder how it works on 18F.
tnay is offline   Reply With Quote
Old 6th March 2007, 07:48 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

The 18F series comes with a nice C18 compiler from Microchip. The Student edition is free.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 6th March 2007, 08:19 PM   (permalink)
Experienced Member
BOBKA is on a distinguished road
Default

C compiler for pics is not as useful as for pc though. Many different #pragma's need to be memorized in order to use it. I wonder if code from C18 can be ported to C30? This would be very useful for code reuse in 30F series.
BOBKA is offline   Reply With Quote
Old 7th March 2007, 10:30 AM   (permalink)
Experienced Member
 
atferrari is on a distinguished road
Default

The addition of LAT register
The increase of RAM memory
The extra (useful) instructions
Bank switching less frequent(?) and simpler

makes, (to me), for not thinking of going back to 16F family.
__________________
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
atferrari is offline   Reply With Quote
Old 9th March 2007, 02:31 PM   (permalink)
New Member
tnay is on a distinguished road
Default

the #pragma statements are very compiler dependent. I'm using general preprocessor directives here, which are the standard C. I only taught myself using C, because assembly language is just too much for my project. I have a lot of complex real time calculation like sorting and masking, it's just not feasible for writing in assembly, imagine bugging through thousands of line.
tnay is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Interfacing 4000 series CMOS to 74HC series TTL kd4pbj General Electronics Chat 11 22nd January 2007 04:52 PM
Difference between 4000 series and 7400 series? ghall426 General Electronics Chat 17 1st January 2007 01:00 AM
40 Series IC. lord loh. General Electronics Chat 2 18th February 2006 04:05 AM
Basic Charts for series AC circuits walters General Electronics Chat 2 23rd June 2005 10:35 AM
Caps in series or.... captainkirksdog General Electronics Chat 5 26th November 2003 11:14 AM



All times are GMT. The time now is 02:36 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.