As a Beginner

Status
Not open for further replies.
Nigel
I've just started your PIC tutorial. But I want to know that, do I need any previous knowledge of assembly language? I'm new to assembly. I've also heard of PIC Basic which is told to be similar to assembly.
 
Nigel Goodwin said:
Either would be perfectly fine, I've no idea what point Salgat was trying to make?.

My point is that with AVR Studio 4 he can easily do the project and simulate it before ever having to devote any money to it (since the program is both professional and free). Before I had enough money to buy my AVR kit I learned the majority of the AVR's functions purely through the simulator.
 
ruzfactor said:
Nigel
I've just started your PIC tutorial. But I want to know that, do I need any previous knowledge of assembly language? I'm new to assembly. I've also heard of PIC Basic which is told to be similar to assembly.

BASIC is nothing like assembler, my tutorials aren't really intended for learning from scratch, they are more a collection of useful routines - which are proven and working - you can learn a LOT by modifying them to do exactly what you want.

For some tutorials that start from no knowledge at all, check the examples in the 'sticky'.
 
But I'm using the Oshonsoft PIC Simulator IDE to test my codes which I'm learning through tutorial (all about LED) as I don't have any programmer.It has some nice feature to test the code.

By the way salgat, I was wondering what is the best language for AVR? C?
 
ruzfactor said:
By the way salgat, I was wondering what is the best language for AVR? C?

'Best' is an entirely subjective term, you will get as many answers as people you ask. 'Best' though really depends on YOU! - if you are already familiar with C, then C would probably be best?, if you don't know C, but do know BASIC, than that might be best for you. But if you're familiar with assembler, then that's another option - and is the 'best' way to get the maximum out of any processor, but that doesn't mean it's the 'best' in practice.
 
Nigel you are the experienced one here. As a complete newbie to microcontrollers am I wasting my time by learning PIC first?? I need to finish the project as soon as possible.I know C language and new to assembly. So far what I've learned with assembly for PIC16F84 was not that difficult. It too early though. I'm asking for your expertise. The thing is I'm very confused. When I'm learning PIC, some part of mind tells me AVR is easier. And when I think of AVR, I get the feeling that PIC should be perfect for my project. What do I do? I can't set my mind.
 
Then get yourself an AVR chip and see which one you prefer. Sounds like a school project so since you have the PIC, know how to program it you should stick with what you have and concentrate on the task at hand.
Yes PIC and AVRs can do the same thing, they have a different instruction set and different quirks but are both excellent microcontrollers. (You don't see anyone blathering on about Motorola, TI, Intel microcontrollers vs PIC/AVR)
 

If you're already learning PIC it makes sense to continue, PIC's are the most popular because they are easy to learn.

As you already know C, play with assembler on the old 16F84 for a while, so you get an understanding for the way PIC's do things, then move to the 18F series and MicroChips free C18 C compiler.

But either are perfectly fine, try both if you like? - it's cheap enough.
 
blueroomelectronics said:
(You don't see anyone blathering on about Motorola, TI, Intel microcontrollers vs PIC/AVR)
Except me. I love Freescale (Motorola) micros. But then I love AVRs and PICs too. They're all good.
 
Actually it's not a school project. Few months ago I built a circuit which is operated with 4x4 Keypad to open a lock. I used a 4 digit password. It used a shift register and logic gates. But there was no way to change the code except the changing the wires. So I decided to modify the whole concept, using a microcontroller so that there would be a code changing option and also has some kind of display. The MCU would operate a relay when the code matches. I have found a ready made project which has every thing including hex file for two different PIC but I want to make my own. That's why I'm interested in learning MCU.
 
Well, I have decided to stick with PIC. I'm learning F84 programming with assembly(50% of the tutorial is complete). I also know that I need a PIC16F628 for my project. So I hope I can also program it if I can learn F84.
I want to know few things:
How do I store a data in the PIC say a 4 digit password which I can change with a keypad later?Which one is the EEPROM??(e.g. for 16F84)

How does a keypad is recognized?say Col1 and Row1 (Row1 to RA0 and Col1 to RB0 pin)is the button for '1'. How does a PIC identify it and compare it with some stored value?? Is this done by logical operations?

For the keypad: Do I need to connect the row or column to any operating voltage via resistors? Or just connect the ROW and Column connections to the MCU PIN?
 

Attachments

  • Switch_Matrix.JPG
    19.1 KB · Views: 141
Last edited:
ya datasheet...

Nigel Goodwin said:
Yes to both - but the 84 is an absolute antique, it was replaced by the 628 last century, but appears to have been re-introduced for all the idiots who keep buying them, and paying extra money for them!.

As written in the datasheet...

Regards,

Simran..
 

Like I said previously, read my tutorial, there's one that does almost everything you want (in the HEX keypad tutorials). The last IR tutorial also shows how to read and write the data EEPROM.
 
Say COUNT has a value of 255 and I wanna create some sort of Delay. For 4mhz crystal whats the delay (in sec) created by the following code:

DELAY decfsz COUNT,1
goto DELAY
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…