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.
 
Hey build the Inchworm ICD2 compatable. Schematics are on my site. I've got to update that old site and post the manual.

Programs all 18Fxxxx and most 16Fxxxx parts. Uses MPLAB and you get a debugger too.

Search these forums for inchworm.
 
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?


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
 
Relays would be the simplest, if you want PWM use one DPDT relay for forward/reverse, and a transistor for PWM.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…