Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Start up questions

Status
Not open for further replies.
Look. I ordered this through ebay for £26 (I think!), the guy sent is very well packed and with a serial cable, and a USB cable. I pluged it in and worked perfectly with USB. Now for deep down technical differences I dont know. But I would recommend it for sure over the other one. If somebody know some technical interesting differences I would be also glad to read them.
 
Query

Hi there,
Iam new to PIC.
I have just installed the MPLAB IDE and started out going by the help file in using IDE.

after loading the f452tmpo.asm and 18F452.lkr , it asked me to go to Project>build all and I did it. But, I was getting the following error repeatedly. Thats why Iam unable to move ahead.

when do we get this error and How to eliminate it?

Clean: Deleting intermediary and output files.
Clean: Deleted file "F:\Raghav\f452tmpo.o".
Clean: Deleted file "F:\Raghav\f452tmpo.ERR".
Clean: Deleted file "f452tmpo.lst".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p18F452 "f452tmpo.asm" /l"f452tmpo.lst" /e"f452tmpo.err" /o"f452tmpo.o"
Warning[230] F:\RAGHAV\F452TMPO.ASM 46 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 47 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 48 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 49 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 50 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 51 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 52 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 53 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 54 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 55 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] F:\RAGHAV\F452TMPO.ASM 56 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPLink.exe" "10f200.lkr" "F:\Raghav\f452tmpo.o" /o"Newbee.cof" /M"Newbee.map"
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - section '.config' can not fit the absolute section. Section '.config' start=0x00300000, length=0x0000000e
Errors : 1

BUILD FAILED: Tue Sep 12 12:18:19 2006

Thanx in advance.
 
ragece777,
The template file f452tmpo.asm calls an include file (P18f452.inc) which should have the old "__config" commands for setting the configuration bits commented out.
eg.
;Program Configuration Register 1H
; __CONFIG _CONFIG1H, _OSCS_OFF_1H & _RCIO_OSC_1H

The new format is to use config commands instead:
eg.
; Power-up Timer:
CONFIG PWRT = ON ;Enabled
; Watchdog Timer:
CONFIG WDT = OFF ;Disabled
etc.

The P18f452.inc file mentions this and shows what settings are available - but does not actually have them setup for you, so you need to set them using the "config" commands.
I have found it is easier to put them all into a seperate file - eg. "config1.inc"
and call that file from your program, that way you can easily make different configs for each new project.
 
You will also want a +5v voltage reg and the appropriate caps, and an xtal with the appropriate stability caps.

You will want a programming header cable so you can program the chip on the board (ICP). In fact it helps to have several. I have one for plugging into a header and one terminated in individual, labelled pins so I can plug the wires onto the protoboard.

I strongly recommend an ICD2 programmer if you're buying a new one!
https://www.sparkfun.com/commerce/product_info.php?products_id=5

That's top of the line, and will support any PIC out there and should be able to support any future PIC. ICD is nice. You can stop the processor and read out all the variables and config registers. More than twice as much, but it's a far better deal. Buy a couple of extra ICD cables with it.
 
after doing a bit more reasearch I've got a few more question,

to do any arithmatic to a mumber you first have to put it tn the w register?

data can be stored in the general purpose regester?

how do you stor 10 bit mumbers such as those generated by the 16f877 adc inputs?

is it possible to display a number grater than 8 bits by using pins of two ports?

can the adc input of 16f877 be changed from 10 bit to 8 bit?
 
Re: Questions

Hi there,

The W register is just the working register you don't need to move any value of the register you want to manipulate into the W register first.

Any number of value up to 255 (FF) can be stored in any of the general purpose registers. If you want to store a larger number you will have to use multiple registers.

As for the A/D results yes you can change the reading from 10bit to 8bit this is setup in one of the A/D control registers.

For the output of 10bits you would have to do this in software as I don't think there is any feature on the PIC's to do this in any other way at the moment.


Hope this helps

Regards

Pete
 
Micro82 said:
As for the A/D results yes you can change the reading from 10bit to 8bit this is setup in one of the A/D control registers.

The word "change" is misleading. The A/D result is always 10-bit and user has no control to ask the A/D converter to perform 8-bit conversion. However, user has a choice of how to place the 10 bit result into two 8-bit registers.

By placing the result with the MSB into the MSB of the ADRESULT High register, that register "effectively" contains the higher eight bits with the LSB two bits in the ADRESULT Low register, which user can leave out if one wants only eight bit accuracy.
 
user1453 said:
only the home page of your site is active

and to be honest usb support is very good for me personally

I've started to update the site, new look now.

As for USB, you can use a RS232 to USB adapter. (which is what most of the USB solutions are)

If you want some real ICD2 speed then you need the type that uses a 18F4550 USB PIC & a 16F877
 
what would be the easiest way of controlling the motors in a lego kit from a pic? (in order to get forwand and reverse
would it be
1-use a h-bridge
2-use relays
3-use comparators with emmitter followers
 
Status
Not open for further replies.

Latest threads

Back
Top