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.

pic compiling/programming questions

Status
Not open for further replies.
Your inventing backwards. A IR module receives. Not a transmitter You use a Ir led for
that. It takes two things to transmit and receive
1 And Ir receiver
2 And Ir transmitter
Read Nigels Tutorials this one first
And then this one
 
It takes two things to transmit and receive
1 And Ir receiver
2 And Ir transmitter

...you really think i am that newb?
(and i dont get what you mean, i know what is a tsop31256 and a tsal6200)

To Nigel:

Doesnt works without the 330 ohms resistor.
 
Last edited:
To Nigel:

Doesnt works without the 330 ohms resistor.

As suggested above, check my tutorial which shows how to connect a TSOP, you're missing vital decoupling components, and like I said, 330 ohms is FAR too low, if any resistor is needed at all. Try a 10K or 47K as pullup, but add the rest of the components as my tutorial - notice mine uses a 10K, but will work without it.
 
..you really think i am that newb?
(and i dont get what you mean, i know what is a tsop31256 and a tsal6200)
No but I sure no how old you are. You can build it any way you want when it brake's
You fix it. When it gos up in smoke you buy it back.
 
PIC16F84A is unjustifiably expensive, but it will work for you, it is the flash version (upgraded) of the 16c84...

MPLAB can take your asm program and convert it to the pic16f84a's machine language. Make sure you select which device you are trying to develop for, it is important so that it can assign the correct registers.

asm programming is in my opinion slightly easier and far more versatile than basic, so good choice. However, for very advanced design you will almost certainly need to use C.. I'm working on a C++ compiler for PIC Micros... I'll be excited when I'm completed!

You can use so many different ways of actually loading the hex into the PIC. I recommend buying a USB one from melabs they are cheap and can program almost all of the PICs in existance. Alternatively, microchip has some on their website, and there are also industrial tpyes that can program in 1 second to 16 chips at a time...costing about 800 dollars. Well worth it in the long run if you mass produce your designs.

Sincerely,

Jesse Randall
Electronic Engineer
**broken link removed**
 
PIC16F84A is unjustifiably expensive, but it will work for you, it is the flash version (upgraded) of the 16c84...


Certainly no one should be using an 16F84, and shouldn't have been for a decade or so - but, it's NOT a FLASH chip.

The 16F84 was the replacement for the 16C84, mainly curing a bug in the code protection routines, where the 16C84 was relatively easy to break the protection on.

Both use the same EEPROM memory techology, as do the vast majority of the F series - only some of the very latest ones are actually FLASH.
 
You can use so many different ways of actually loading the hex into the PIC. I recommend buying a USB one from melabs they are cheap and can program almost all of the PICs in existance. Alternatively, microchip has some on their website, and there are also industrial tpyes that can program in 1 second to 16 chips at a time...costing about 800 dollars. Well worth it in the long run if you mass produce your designs.

You obviously have not been following this thread. The OP is a young hobbyist with limited financial resources. He has already bought a PICkit 2 and 16F628As and 18F2525s.
 
That is really strange, only the port b works as input on all my 16f628a. Do i have to set to port in some way?

This problem driven me crazy because i was wondering why my 3 line program was not working.Works on port b...

bsf STATUS,RP0
bcf TRISB,0

bcf STATUS,RP0
there:
bcf PORTB,0
here:
btfss PORTB,1
goto there
bsf PORTB,0
goto here

Works here

bsf STATUS,RP0
bcf TRISB,0

bcf STATUS,RP0
there:
bcf PORTB,0
here:
btfss PORTA,1
goto there
bsf PORTB,0
goto here
doesnt here...
 
Last edited:
How would one no what is wrong can't see your code from here. Here why
Code:
Start:
[COLOR="Red"]	movlw	0x07 
    movwf	CMCON   ;turn comparators off[/COLOR]
    movlw B'00000000  ;loads w 
    banksel TRISA     ;moves to tris reg.
    movwf TRISA    ;wirtes to tris setting all to out put
    banksel PORTA  ; moves to Porta reg
    clrf PORTA     ; sets all pins to output
most likely the part in red
 
Last edited:
That is really strange, only the port b works as input on all my 16f628a. Do i have to set to port in some way?

This problem driven me crazy because i was wondering why my 3 line program was not working.Works on port b...

You have to turn off the comparators on port A.
 
PICs reset with analog inputs enabled. Use to disable comparators.

Code:
movlw	0x07
movwf	CMCON
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top