Hey Folks: I got a PIC DEMO 2+ board & ICD2 recently. I've used 68k and x86 asm before and now need to find out about PIC asm. I've got a program that gets the USART going in a PIC 18C452, but I have an 18F452. How much damage would it do if I just changed all the references in the asm code from 18C452 to 18F452? I imagine the registers and other layouts are identical, but haven't gotten the time just yet (amidst other demands) to definitely find out. Are my assumptions good or will I burn something on the board/processor? Thanks in advance, 2Penny (aka: LWRogers)
New to PIC
Started by ●November 30, 2004
Reply by ●November 30, 20042004-11-30
2Penny <lw_rogers@sbcglobal.net> wrote in message news:<MQUqd.36325$6q2.3958@newssvr14.news.prodigy.com>...> Hey Folks: > > I got a PIC DEMO 2+ board & ICD2 recently. I've used 68k and x86 > asm before and now need to find out about PIC asm. I've got > a program that gets the USART going in a PIC 18C452, but I have > an 18F452. How much damage would it do if I just changed all the > references in the asm code from 18C452 to 18F452? I imagine > the registers and other layouts are identical, but haven't gotten > the time just yet (amidst other demands) to definitely find out. > Are my assumptions good or will I burn something on the board/processor? > > Thanks in advance, > > 2Penny (aka: LWRogers)It's unlikely you will fry anything. Microchip tries to make chips with the same pinout pretty much firmware compatible. Some of your initialization code might change, but typically the worst that will happen is some pin that used to be an output in your old code will become an ADC input (until you change the initialization code). The PICDEM2 is a pretty nice board for learning about PICs. I wish Microchip would release some C "drivers" for it. Have you tried the C18 compiler yet? Mark
Reply by ●December 1, 20042004-12-01
Mr Hahn: I can barely afford the PIC stuff I got so a "C" compiler is out of the question just now. Spent too much money on book/CD combinations of a professional nature. I have to use what I have before I ask for more. I appreciate the banter, but that really didn't answer my question. Is the 18C452 identical enough to the 18F452 that I can share code WITHOUT modification with exception given to substituting "18F452" wherever "18C452" currently occurs in some assembly code I have access to ? Very interested in knowing before I burn something, 2Penny mark hahn wrote:> 2Penny <lw_rogers@sbcglobal.net> wrote in message news:<MQUqd.36325$6q2.3958@newssvr14.news.prodigy.com>... > >>Hey Folks: >> >>I got a PIC DEMO 2+ board & ICD2 recently. I've used 68k and x86 >>asm before and now need to find out about PIC asm. I've got >>a program that gets the USART going in a PIC 18C452, but I have >>an 18F452. How much damage would it do if I just changed all the >>references in the asm code from 18C452 to 18F452? I imagine >>the registers and other layouts are identical, but haven't gotten >>the time just yet (amidst other demands) to definitely find out. >>Are my assumptions good or will I burn something on the board/processor? >> >>Thanks in advance, >> >>2Penny (aka: LWRogers) > > > It's unlikely you will fry anything. Microchip tries to make chips > with the same pinout pretty much firmware compatible. Some of your > initialization code might change, but typically the worst that will > happen is some pin that used to be an output in your old code will > become an ADC input (until you change the initialization code). > > The PICDEM2 is a pretty nice board for learning about PICs. I wish > Microchip would release some C "drivers" for it. Have you tried the > C18 compiler yet? > > Mark
Reply by ●December 1, 20042004-12-01
>Subject: Re: New to PIC >From: 2Penny lw_rogers@sbcglobal.net >Date: 01/12/2004 07:58 GMT Standard Time >Message-id: <gQerd.52344$QJ3.39263@newssvr21.news.prodigy.com>> >I appreciate the banter, but that really didn't answer my >question. Is the 18C452 identical enough to the 18F452 that I >can share code WITHOUT modification with exception given to >substituting "18F452" wherever "18C452" currently occurs in >some assembly code I have access to ? >I cant imagine it not working, why dont you read the datasheets? They are free from the microchip site. You will need to read the datasheet sometime anyway, so why not do it now?
Reply by ●December 1, 20042004-12-01
2Penny wrote:> > I can barely afford the PIC stuff I got so a "C" compiler is > out of the question just now. Spent too much money on book/CD > combinations of a professional nature. I have to use what I have > before I ask for more.Please don't toppost. Your answer belongs after, or intermixed with, the quoted material after snipping out anything not germane to your reply. You have available a completely free development and simulation system from Microchip. No cost is involved. Just download and install their MPLAB system. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
Reply by ●December 2, 20042004-12-02
You ask a question and then you complain that the answer does not fit your idea of a correct answer. Fuck You CBFalconer wrote:> 2Penny wrote: > >>I can barely afford the PIC stuff I got so a "C" compiler is >>out of the question just now. Spent too much money on book/CD >>combinations of a professional nature. I have to use what I have >>before I ask for more. > > > Please don't toppost. Your answer belongs after, or intermixed > with, the quoted material after snipping out anything not germane > to your reply. > > You have available a completely free development and simulation > system from Microchip. No cost is involved. Just download and > install their MPLAB system. >
Reply by ●December 2, 20042004-12-02
Mr Falconer: I top post because I've developed a dislike for wading through all the garbage from other posts in other threads, in other newsgroups one more time when I've read most of the post in any one thread 3 times already. I thought to extend the courtesy of getting to any points I hope to make quickly for sake of anyone who cares to read any part of my posts. If you know nothing about the comparison of the two chips, you could have just said so. I was hoping to use this newsgroup for what newsgroups were intended hto be (in the days of DARPA). I was hoping for the exchange of information not just a simplistic, "look it up". Still hopeful, 2Penny CBFalconer wrote:> 2Penny wrote: > >>I can barely afford the PIC stuff I got so a "C" compiler is >>out of the question just now. Spent too much money on book/CD >>combinations of a professional nature. I have to use what I have >>before I ask for more. > > > Please don't toppost. Your answer belongs after, or intermixed > with, the quoted material after snipping out anything not germane > to your reply. > > You have available a completely free development and simulation > system from Microchip. No cost is involved. Just download and > install their MPLAB system. >
Reply by ●December 2, 20042004-12-02
"2Penny" <lw_rogers@sbcglobal.net> wrote in message news:DIzrd.37248$6q2.17910@newssvr14.news.prodigy.com...> Mr Falconer: > > I top post because I've developed a dislike for wading through > all the garbage from other posts in other threads, in other > newsgroups one more time when I've read most of the post in any > one thread 3 times already. I thought to extend the courtesy > of getting to any points I hope to make quickly for sake of anyone > who cares to read any part of my posts.Just my 2 cents: if you toppost because you don't like wading through the 'garbage', it implies that you leave the garbage at the end of the message where it is less noticed. This implies that the garbage is resent all the time through 10 thousands of newsservers, eating up bandwith and costing people money who download over a phone line (yes they still exist in large numbers). If you bottom post and leave all the garbage, there is a bigger chance that someone sensible will cut the irrelevant excess before replying (something you should have done too) and keep the message short and clear to anyone who chimes in at the middle of a thread. If you toppost, someone who enters the discussion halfway, he or she has to read the entire 'garbage' backwards (from bottom to top) to learn what the discussion was about and how it developed. Does that sound logical to you? So, my opinion is: if you enter a community with a question, it is no more than polite to adhere to (unwritten) standards that are common in that community. You get far more cooperation than if you just say: "hell, I do it my way because I like it that way, I don't care what others think about it." And now to your question: if your assembly code accesses registers throug definitions in a header- or include file, changing the reference to that include file from one to another processor is basically all that needs to be done. If the code then assembles without errors, there is hardly any problem to be expected. You will certainly not burn something. The only way to be absolutely shure is to read the datasheet and find out where the differences are. Meindert
Reply by ●December 2, 20042004-12-02
> If you toppost, someone who enters the discussion halfway, he or she has to > read the entire 'garbage' backwards (from bottom to top) to learn what the > discussion was about and how it developed. Does that sound logical to you?Actually, he or she would just read the previous posts in the thread :) Al> >
Reply by ●December 2, 20042004-12-02
"Al Borowski" <al.borowski@EraseThis.gmail.com> wrote in message news:41aeec98$0$25779$5a62ac22@per-qv1-newsreader-01.iinet.net.au...> > > If you toppost, someone who enters the discussion halfway, he or she hasto> > read the entire 'garbage' backwards (from bottom to top) to learn whatthe> > discussion was about and how it developed. Does that sound logical toyou?> > Actually, he or she would just read the previous posts in the thread :)Assuming the posts are still present on his or her newsserver. One of the major providers over here has a retention time of just one single day...... Meindert