The defendant's attorney shall notify the court of the representation immediately after accepting it. If the defendant does not employ an attorney, the court shall appoint an attorney to represent the defendant not less than five (5) days in advance of the hearing. An attorney representing the defendant shall not serve as guardian ad litem. If the court determines that the defendant is not able to understand the nature of the proceedings and cannot communicate with counsel in the conduct of the case, the court may appoint another person to serve as the defendant's guardian ad litem.