Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 22
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
No birthdays today

Next birthdays
05/07 a.gutzeit (64)
05/08 wpk5008 (35)
05/09 Alfons (37)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Trying to build a cheap and simple oscilloscope. How to program an AVR?

1 2 
Move Thread LAN_403
cavemen
Sun Aug 30 2009, 09:50PM Print
cavemen Registered Member #2008 Joined: Tue Mar 03 2009, 05:11AM
Location: USA, Frederick, MD
Posts: 118

I want to build this scope
.
Link2


How would i have to program the Atmel Tiny45-20?
Do I need a special jig for hooking this chip up to my PC?

What code do I put in out of all the files?

I never programmed microcontrollers before.

Thanks.



Link2

does this apply?
how do i hook it up?


[edit: Double post]
Back to top
3l3ctrici7y
Mon Aug 31 2009, 01:31AM
3l3ctrici7y Registered Member #1806 Joined: Sun Nov 09 2008, 04:58AM
Location: USA
Posts: 136
On the instructables page it shows a connection diagram where you connect the wires from the computer to the wires on the microcontroller.

You will want to grab the datasheet for the attiny45 and find where the relevant pins are; you will want VCC, VSS, /RESET, SCK, MOSI, and MISO. You can follow the instructions in the instructable; it will say which parallel port pin to connect to what named pin on the microcontroller.

You will have to setup the development environment on your computer so that you can run AVRDUDE to do the actual programming. Something else is that with parallel port programmers; you cannot use a cable. You must plug it directly into the computer. Also; it would be best if you directly powered the chip with a regulated 5 volt supply rather than rely on the computer to power the chip.

What I did is mount a DIP socket on a small piece of perfboard along with a DB25 connector to connect to the computer's parallel port, and a power jack for connecting the regulated supply.

5v power supplies are quite common.. if you have a computer power supply sitting around, you can use that. Zip drives use 5v power, some cell phone chargers are, and if all else fails, you can get a combo 5/12 volt supply off of a HongKong seller on ebay for a very small sum of money.


To directly answer your questions...
1) Build or buy a programmer; the instructable page described building one.
2) Yes.
3) You download the files from the page describing the oscope; that should have the necessary stuff.
4) Yes.
5) The instructable describes that.


[Edit: Double post]
Back to top
cavemen
Mon Aug 31 2009, 02:13AM
cavemen Registered Member #2008 Joined: Tue Mar 03 2009, 05:11AM
Location: USA, Frederick, MD
Posts: 118
Thanks.

Or should I build this scope:
Link2

I am in doubt, but same techniques apply.
Back to top
3l3ctrici7y
Mon Aug 31 2009, 03:37AM
3l3ctrici7y Registered Member #1806 Joined: Sun Nov 09 2008, 04:58AM
Location: USA
Posts: 136
Personally I prefer the AVR over the PIC.
Therefore I suggest building the AVR version (the first one you mentioned.
Back to top
Wolfram
Mon Aug 31 2009, 04:48PM
Wolfram Registered Member #33 Joined: Sat Feb 04 2006, 01:31PM
Location: Norway
Posts: 971
Which one to chose depends on how fast signals you are going to measure, also. The AVR one can do some hundreds of samples per second, the PIC one does 60 000.


Anders M.
Back to top
cavemen
Mon Aug 31 2009, 09:27PM
cavemen Registered Member #2008 Joined: Tue Mar 03 2009, 05:11AM
Location: USA, Frederick, MD
Posts: 118
I like PIC circuit more, because i need high frequincy oscilloscope.

The only problem is that there is a ghetto way to program AVR using computer parallel port described on Instructables.com, but i couldn't find any simple jug like that for programming PICs.

Is there such simple solution for PIC?
Can you give me the link, please, if you know something.


and the official microchip website are the only resources I found.

I never messed with microcontrollers before, so i don't know how to do this stuff by just reading the data sheet.

Also i don't want to build a complex device.

[Moderator Edit: Fixed double post.]
Back to top
Wolfram
Tue Sept 01 2009, 09:26AM
Wolfram Registered Member #33 Joined: Sat Feb 04 2006, 01:31PM
Location: Norway
Posts: 971
The Tiny PIC Bootloader won't help you in this case, as you need to program it into the PIC before you can use it.

There are many simple serial port PIC programmers, here's an example: Link2

For the programming software to use, I can recommend Link2

Also, please don't double post.


Anders M.
Back to top
cavemen
Wed Sept 02 2009, 01:16AM
cavemen Registered Member #2008 Joined: Tue Mar 03 2009, 05:11AM
Location: USA, Frederick, MD
Posts: 118
Can this circuit do the programming?
Link2
Link2

I really like the idea of using my paralel port. for programming.

No data buffering, simple as hell.

Then i just add the code into the program and it programs it for me?
Back to top
...
Wed Sept 02 2009, 05:03AM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
Another solution would be to have someone with a programmer do it, there are several members on the forum with them. i would offer, but I am in hawaii right now and would not be able to get to it for a week or so.
Back to top
cavemen
Sat Sept 05 2009, 04:06PM
cavemen Registered Member #2008 Joined: Tue Mar 03 2009, 05:11AM
Location: USA, Frederick, MD
Posts: 118
As i noticed, the oscilloscope
Link2
should be built with a mysterious circuit that is titled RS-232 level converter.
Link2
The author says it is for computer to communicate with the circuit by standard 5V signals.

Is it device a programmer that uses serial port to program this microcontroller while it is already soldered into the circuit board?

Is this device a programmer?
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.