Well lets start by welcoming you to the site. Welcome to the best little XS650 forum out there.
Now that's taken care of lets get a few facts right. The XS650 never had a CDI, capacitive discharge ignition, It uses a TCI, transistor controlled ignition. If you want to know more about the differences, Google it.
Now getting a good used TCI box can be a bit of a crap shoot. They are 35+ years old and reaching their end of life. You might get lucky and get a good one for cheap or go through a few to get a good one.
I might start by posting a wanted to buy ad in the classified on here.
I can recommend the Pamco as an easy to install, great ignition. I have run both the Basic Pamco as well as the E-advancer version. Both work very well.
Another thing I can recommend is to get a repair manual and read it before going to far.
Take the battery out and check the water level, If low fill to between the lines with distilled water, nothing else goes in a battery. If you have a motorcycle battery charger then use it to charge the battery. DO NOT use a car charger, it will hurt the battery. Wal Mart sells a motorcycle charger. I was just looking at them, I think it sell for $19. I have two like it already but I was looking anyway.
Once the battery is fully charged take it to a place that sells batteries and get it load tested.
If it passes ok, if not get a new one. The bike won't run or charge the battery without a good battery.
www.amckayltd.com/carbguide.pdf is a good read. If the bike has set very long the carbs need cleaning. The carb guide tells how to tear down, clean, inspect, repair, reassemble and tune your carbs.
Leo