flat assembler
Message board for the users of flat assembler.

Index > Heap > PIC microchip help

Author
Thread Post new topic Reply to topic
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
Hello everyone! I have some questions about PIC microchip. (Yes, I know it's in wikipedia but I need some short explanation.)
1) What is that for ?
2) If I'll program it to do something, it will do it automatically after pluging in ?
3) Where to buy it ? and how much it costs ?
Thanks Wink
EDIT:
does FASM support that or will ?
Post 03 Sep 2011, 18:56
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
it is a single chip computer. it has processor, program memory, data memory (these things usually are separate in such things), i/o ports, timer(s) and optionally other feature things: DAC, ADC, etc., and everything is in the single chip.
of course, it can be of small size, but when you need, say, kitchen timer, you do not need much memory to keep current time.
you can buy it in different way - in the radio parts shop, at the market etc. price vary on device type, but simple things are cheap enough ($1-3).
also, you will need a programmer to program it through USB, but if you have LPT port, you may make by yourself a "5 wire ISP programmer" (i'm just not familiar with PIC, but think it has similar way to program)

fasm does not support it, as it is not x86 architecture, possible with macros, but there is no sense to do it
Post 03 Sep 2011, 19:17
View user's profile Send private message Visit poster's website Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
shoorick
I want to buy latest device type and 1 more thing, after pluging it in my pc, it will do whatever I program automatically ? or I have to do it manually ? Thanks.
Post 03 Sep 2011, 20:09
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
for a PIC to work, as I understand, it doesn't have to be pluged in the PC. Its a microcontroller. (like a tiny small 8 bit pc).
You see it like a chip very similar to a CPU but actually, its more like the whole PC: cpu, ram, in/out ports, etc...

theres lots of info in the web, and actually, I think you can program it using an old mobilephone cable like nokia ca-42 or dku-5 that are rs-232 interface.
Post 03 Sep 2011, 20:42
View user's profile Send private message Reply with quote
malpolud



Joined: 18 Jul 2011
Posts: 344
Location: Broken hippocampus
malpolud
PIC are microcontrollers. like Shoorick said single chip computer. basically you can say that after power up it will start executing code, for example start to communicate with other devices, toggling outputs, wait for interrupts or start processing data. (there are things like initialization - some kind of booting, but that is not important to understand uC's).

currently i try to work on TI's MSP430 and ARM CM3 uC's.

cheers
Post 03 Sep 2011, 21:25
View user's profile Send private message Visit poster's website Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
Wow, thats awesome!
as I guess, if I'll program that chip to do something, like opening CD-ROM on my pc, after plugging it to my pc and power up, it will open CD-ROM right ?
Post 03 Sep 2011, 21:43
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
Overflowz wrote:
Wow, thats awesome!
as I guess, if I'll program that chip to do something, like opening CD-ROM on my pc, after plugging it to my pc and power up, it will open CD-ROM right ?

You will have to have a program in the pc that will comunicate with the PIC, so when the PIC tells the PC to open the CD drive, this program should open it.

Or you will have to make an interface that will connect to the cd drive open button (dont know for sure)

It should be even possible to make this happen when you recive a phone call in your home line. When you recive a call, the cd drives opens.
Post 03 Sep 2011, 21:53
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
I can't access hardware with PIC ? I mean, in Real Mode when PC boots up, it communicates with hardwares with IN and OUT instructions so, can't PIC do that too ?
Post 03 Sep 2011, 22:05
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Overflowz wrote:
I can't access hardware with PIC ? I mean, in Real Mode when PC boots up, it communicates with hardwares with IN and OUT instructions so, can't PIC do that too ?


You have to make a driver for that Razz

Or do serial port programming to support ring3. (I still think you'd have to use a driver for that IDK)
Post 03 Sep 2011, 22:17
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
Okay, I get enough information. Thank you all Smile
Post 03 Sep 2011, 22:32
View user's profile Send private message Reply with quote
malpolud



Joined: 18 Jul 2011
Posts: 344
Location: Broken hippocampus
malpolud
I'm not sure if you get the idea of microcontrollers. They are totally independent microcomputers, and you don't have to plug them to PC to get them working. Basically you use a PC to write the code, compile it (cross-compile) and to upload the binary file to the microcontroller (via hardware programmer) and optionally to debug. Its like having a small computer with few kB's of rom and even less ram, that has peripherals like timers, AD converters. Of course there are also powerful uC's that have multiple 32bit cores.

Imagine a washing machine. A uC unit waits for your orders like length of cycle, temperature, etc and tells the engine when to roll, collects data from thermometers, tells the heater when it should stop heating.
Post 04 Sep 2011, 08:13
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
sparkfun.com is a good place for buying the stuff and it has a lot of tutorials.
Post 05 Sep 2011, 02:17
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.