A bit of an Arduino riddle...

If you wanted to connect an arduino to a 9v battery, you would just use the barrel connector. If you wanted to connect the 9v battery to the arduino without the barrel connector, you would use a linear voltage regulator and use the Vin pin. If you wanted to connect the arduino to the 9v battery using a switch mode power supply, you would use a switch mode power supply ic.

If, however, you wanted to use a switch mode power supply and use the arduino as that ic, how would you do it? You would PWM with the arduino and use a transistor, but for the arduino to start the PWM, it has to be powered, but to be powered, it has to already have its PWM going...

Just an interesting thing I thought of, it is not for a specific project, but rather just something to ponder. I assume you would have to 'jump start' the arduino, but is there another way without jump starting it?

I don't see the point of the question. Just buy a switch mode module.

Is there a reason why you would not use a self sufficient switch mode power supply?

Like I said before, it is not for a specific project, just something to think about. I don't know if there is a way around it, but I was just curious to see what other people thought.

A way around it.

Circular references are a regular problem with computers.

...R

If you wanted to connect the 9v battery to the arduino without the barrel connector, you would use a linear voltage regulator and use the Vin pin.

No.
You would use a regulator and use the 5V pin, not the Vin pin.

If, however, you wanted to use a switch mode power supply and use the arduino as that ic, how would you do it?

You would arrange for the default for the power supply to be on, but then as it came on he first thing it would do is to turn off the switch.
However you can not do that because of the delay that the bootloader gives while it is waiting to see if an upload is required. Therefore you would have to run such a system without a bootloader.